优化代码

This commit is contained in:
RuoYi
2018-06-15 15:25:59 +08:00
parent 81b1d1c219
commit 5f0fa0d42f
60 changed files with 169 additions and 671 deletions

View File

@ -20,14 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRoleList" parameterType="Role" resultMap="RoleResult">
select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role
<where>
<if test="roleName != null and roleName != ''">
AND role_name like concat('%', #{roleName}, '%')
</if>
<if test="roleKey != null and roleKey != ''">
AND role_key like concat('%', #{roleKey}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
<if test="searchValue != null and searchValue != ''">
AND role_key like concat('%', #{searchValue}, '%') OR role_name like concat('%', #{searchValue}, '%')
</if>
</where>
</select>