瀏覽代碼

角色查询BUG修复

wangliang 2 年之前
父節點
當前提交
86a2dcf9e6
共有 1 個文件被更改,包括 6 次插入0 次删除
  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>