fix(系统设置): 查询用户组关联关系sql优化

This commit is contained in:
AgAngle 2023-09-08 10:01:26 +08:00 committed by fit2-zhao
parent 9a0560bd42
commit 29b610e3e6
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@
select urr.id, u.id as userId, u.name, u.email, u.phone
from user_role_relation urr
inner join user u on urr.user_id = u.id and urr.role_id = #{request.roleId} and u.deleted = 0
<if test="request.keyword != null">
<if test="request.keyword != null and request.keyword != ''">
and (
u.name like concat('%', #{request.keyword},'%')
or u.email like concat('%', #{request.keyword},'%')