From 566c44cc5712ab9c997424ee5a5438e0a81a016e Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 17 五月 2023 18:49:38 +0800
Subject: [PATCH] BUG修改
---
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