From db7fa6a91b9534ac90e219b6f554c54c43c83a5a Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期三, 16 八月 2023 09:28:15 +0800 Subject: [PATCH] update --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml index c0afcd5..2209457 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml @@ -11,6 +11,8 @@ <result column="deptid" property="deptid" /> <result column="tips" property="tips" /> <result column="version" property="version" /> + <result column="headName" property="headName" /> + <result column="headPhone" property="headPhone" /> </resultMap> <sql id="Base_Column_List"> @@ -20,9 +22,18 @@ <select id="selectRoles" resultType="map"> select rr.*,(SELECT COUNT(id) from sys_user where FIND_IN_SET(rr.id,roleid)) as userCount from sys_role as rr - <if test="condition != null"> - where rr.name like CONCAT('%',#{condition},'%') - </if> + <where> + <if test="condition != null and condition != ''"> + and rr.name like CONCAT('%',#{condition},'%') + </if> + <if test="headName != null and headName != ''"> + and rr.headName like CONCAT('%',#{headName},'%') + </if> + <if test="headPhone != null and headPhone != ''"> + and rr.headPhone like CONCAT('%',#{headPhone},'%') + </if> + </where> + ORDER BY rr.num </select> <delete id="deleteRolesById"> -- Gitblit v1.7.1