优化代码
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user