Browse Source

角色查询BUG修复

wangliang 2 years ago
parent
commit
86a2dcf9e6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      teachcloud-common/src/main/resources/mapper/SysRoleMapper.xml

+ 6 - 0
teachcloud-common/src/main/resources/mapper/SysRoleMapper.xml

@@ -63,6 +63,12 @@
         union
         <include refid="Base_Column_List" />
         where t.default_role = 1 and (t.type = 'SCHOOL_ADMIN' or t.type = 'SCHOOL_TEACHER' or t.type = 'ASSISTANT')
+            <if test="name != null and name != ''">
+                and t.name like concat('%', #{name}, '%')
+            </if>
+            <if test="enable != null and enable != '' or enable == 0">
+                and t.enable = #{enable}
+            </if>
             ) t
         ORDER BY t.create_time
     </select>