[修改] 用户列表,角色搜索

This commit is contained in:
bupengxiang
2023-05-18 21:11:27 +08:00
parent 429a111431
commit 09eb8c5171
@@ -9,13 +9,15 @@
GROUP_CONCAT( DISTINCT org.LONG_NAME ORDER BY org.ID DESC )as ORGNAME GROUP_CONCAT( DISTINCT org.LONG_NAME ORDER BY org.ID DESC )as ORGNAME
from from
( (
select * from TS_USER select tu.* from TS_USER tu
where del_flag = 0 left join TR_USER_ROLE tur on tu.USID=tur.USER_ID
left JOIN TS_ROLE tr on tur.ROLE_ID=tr.ID
where tu.del_flag = 0
<if test="account !='' and account !=null"> <if test="account !='' and account !=null">
and ACCOUNT like CONCAT('%',CONCAT(#{account},'%')) and ACCOUNT like CONCAT('%',CONCAT(#{account},'%'))
</if> </if>
<if test="roleName !='' and roleName !=null"> <if test="roleName !='' and roleName !=null">
and NAME like CONCAT('%',CONCAT(#{roleName},'%')) and tr.NAME like CONCAT('%',CONCAT(#{roleName},'%'))
</if> </if>
ORDER BY UPDATE_TIME DESC ORDER BY UPDATE_TIME DESC
LIMIT #{current},#{size} LIMIT #{current},#{size}
@@ -31,14 +33,17 @@
</select> </select>
<select id="listCount" resultType="java.lang.Long"> <select id="listCount" resultType="java.lang.Long">
select count(1) from TS_USER select count(1) from TS_USER tu
where del_flag = 0 left join TR_USER_ROLE tur on tu.USID=tur.USER_ID
left JOIN TS_ROLE tr on tur.ROLE_ID=tr.ID
where tu.del_flag = 0
<if test="account !='' and account !=null"> <if test="account !='' and account !=null">
and ACCOUNT like CONCAT('%',CONCAT(#{account},'%')) and ACCOUNT like CONCAT('%',CONCAT(#{account},'%'))
</if> </if>
<if test="roleName !='' and roleName !=null"> <if test="roleName !='' and roleName !=null">
and NAME like CONCAT('%',CONCAT(#{roleName},'%')) and NAME like CONCAT('%',CONCAT(#{roleName},'%'))
</if> </if>
</select> </select>
<select id="getUserCount" resultType="java.lang.Long"> <select id="getUserCount" resultType="java.lang.Long">