liyg před 2 roky
rodič
revize
50d62620d2

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

@@ -124,7 +124,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-           <if test="id!=null and id.size>0">
+           <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}
@@ -148,7 +148,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-           <if test="id!=null and id.size>0">
+           <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}
@@ -172,7 +172,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-           <if test="id!=null and id.size>0">
+           <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}
@@ -200,7 +200,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and id.size>0">
+            <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}
@@ -228,7 +228,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-           <if test="id!=null and id.size>0">
+           <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}
@@ -257,7 +257,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and id.size>0">
+            <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}
@@ -281,7 +281,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-           <if test="id!=null and id.size>0">
+           <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}
@@ -305,7 +305,7 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
-            <if test="id!=null and id.size>0">
+            <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}