Browse Source

sz 列表查询语句修改

xiao547607 5 years ago
parent
commit
48358f70e9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      common/src/main/resources/mapper/base/PersonInfo.xml

+ 2 - 2
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -184,7 +184,7 @@
                 and a.name_ like #{searchParams.name}
             </if>
             <if test="searchParams.nameList != null">
-                <foreach item="name" collection="searchParams.nameList"  open="and" separator="or">
+                <foreach item="name" collection="searchParams.nameList"  open="and (" separator="or" close=")">
                     a.name_ like #{name}
                 </foreach>
             </if>
@@ -275,7 +275,7 @@
         where a.del_flag = 0
         and b.code_ like #{searchParams.code}
         <if test="searchParams.nameList != null">
-            <foreach item="name" collection="searchParams.nameList"  open="and" separator="or">
+            <foreach item="name" collection="searchParams.nameList"  open="and (" separator="or" close=")">
                 a.name_ like #{name}
             </foreach>
         </if>