wangyangyang 4 роки тому
батько
коміт
d8bb26b6c5
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      user_center/src/main/resources/mapper/UserMapper.xml

+ 6 - 6
user_center/src/main/resources/mapper/UserMapper.xml

@@ -219,14 +219,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM uims_user a
         <include refid="sysAreaJoins"/>
         where a.status=1
-        and (1=1
         <if test="compayId != null and compayId != ''">
-          or  a.COMPANY_ORG_ID = #{compayId}
-        </if>
-        <if test="deptId != null and deptId != ''">
-           or a.DEPT_ORG_ID = #{deptId}
+            and (
+               a.COMPANY_ORG_ID = #{compayId}
+                <if test="deptId != null and deptId != ''">
+                   or a.DEPT_ORG_ID = #{deptId}
+                </if>
+            )
         </if>
-        )
     </select>
 
     <select id="findUserIdsByPermissonOrg" resultType="java.lang.Integer">