haogh 10 сар өмнө
parent
commit
2ed9be0fe4

+ 6 - 4
paper-library-common/src/main/resources/mapper/SysRoleMapper.xml

@@ -54,6 +54,12 @@
             <if test="schoolId != null">
                 and school_id = #{schoolId}
             </if>
+        </where>
+        union
+        <include refid="Base_Column_List"></include>
+        where school_id is null and default_role = 1 and (type <![CDATA[ <> ]]> 'ADMIN' or type is null)
+        ) t
+        <where>
             <if test="name != null and name != ''">
                 and name like concat('%', #{name}, '%')
             </if>
@@ -61,10 +67,6 @@
                 and enable = #{enable}
             </if>
         </where>
-        union
-        <include refid="Base_Column_List"></include>
-        where school_id is null and default_role = 1 and (type <![CDATA[ <> ]]> 'ADMIN' or type is null)
-        ) t
         ORDER BY t.create_time
     </select>
 

+ 1 - 1
paper-library-common/src/main/resources/mapper/SysUserMapper.xml

@@ -57,7 +57,7 @@
                 and a.school_id = #{schoolId}
             </if>
             <if test="userInfo != null and userInfo != ''">
-                and a.login_name like concat('%', #{userInfo} , '%') or a.real_name like concat('%', #{userInfo} , '%') or a.mobile_number like concat('%', #{userInfo} , '%')
+                and (a.login_name like concat('%', #{userInfo} , '%') or a.real_name like concat('%', #{userInfo} , '%') or a.mobile_number like concat('%', #{userInfo} , '%'))
             </if>
             <if test="orgId != null and orgId != ''">
                 and a.org_id = #{orgId}