dzx 1 سال پیش
والد
کامیت
21d62f1e7e
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      src/main/resources/mapper/activity/ActivityInfoMapper.xml

+ 8 - 2
src/main/resources/mapper/activity/ActivityInfoMapper.xml

@@ -11,7 +11,10 @@
         LEFT JOIN xjr_dictionary_detail t2 ON t1.type = t2.code
         LEFT JOIN company_coop t3 ON t1.enterprise_id = t3.id
         LEFT JOIN xjr_department t4 ON t1.org_id = t4.id
-        WHERE t1.delete_mark = 0 and t1.category = #{dto.category}
+        WHERE t1.delete_mark = 0
+        <if test="dto.category != null">
+            and t1.category = #{dto.category}
+        </if>
         <if test="dto.isEffective != null and dto.isEffective == 1">
             and (t1.status = 1 or t1.status = 2) and NOW() between t1.start_date and t1.end_date
         </if>
@@ -25,7 +28,10 @@
         LEFT JOIN company_coop t3 ON t1.enterprise_id = t3.id
         LEFT JOIN xjr_department t4 ON t1.org_id = t4.id
         LEFT JOIN activity_enroll t5 ON t1.id = t5.activity_info_id
-        WHERE t1.delete_mark = 0 and t1.category = #{dto.category} and t5.user_id = #{dto.loginUserId}
+        WHERE t1.delete_mark = 0 and t5.user_id = #{dto.loginUserId}
+        <if test="dto.category != null">
+            and t1.category = #{dto.category}
+        </if>
         <if test="dto.isEffective != null and dto.isEffective == 1">
             and (t1.status = 1 or t1.status = 2) and NOW() between t1.start_date and t1.end_date
         </if>