Ver Fonte

快手-盯盘-head Big && Naoren Pain again

yangzian há 3 anos atrás
pai
commit
c3fcbe239b

+ 18 - 10
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialStareMapper.xml

@@ -1091,16 +1091,24 @@
         t1.account_status as 'accountStatus'
         from ctop_user_allocation t1
         where t1.account_status = 0
-        and t1.project_id in
-        <foreach collection="list" item="item" separator=","
-                 open="(" close=")">
-            #{item}
-        </foreach>
-        and t1.user_id in
-        <foreach collection="userIds" item="item" separator=","
-                 open="(" close=")">
-            #{item}
-        </foreach>
+
+        <if test="list != null and list.size() != 0 ">
+            and t1.project_id in
+            <foreach collection="list" item="item" separator=","
+                     open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+
+
+        <if test="userIds != null and userIds.size() != 0 ">
+            and t1.user_id in
+            <foreach collection="userIds" item="item" separator=","
+                     open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
+
         order by t1.create_time desc
     </select>