liyg 2 years ago
parent
commit
6d36a03e21
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

+ 5 - 5
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -337,7 +337,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -362,7 +362,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -402,7 +402,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label" || "points", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -427,7 +427,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}
@@ -484,7 +484,7 @@
             <if test="materialTypeName!=null and materialTypeName!=''">
                 AND REGEXP_LIKE("materialTypeName", #{materialTypeName})
             </if>
-            <if test="id!=null and !(index!=null and index!='')">
+            <if test="id!=null and id.size > 0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
                     #{item}