26 lines
908 B
XML
26 lines
908 B
XML
![]() |
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<!DOCTYPE mapper
|
||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper">
|
||
|
|
||
|
<select id="getUsersByRoleRescue" resultType="cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO">
|
||
|
SELECT
|
||
|
distinct su.*
|
||
|
FROM
|
||
|
system_users su
|
||
|
INNER JOIN system_user_role ur on ur.user_id = su.id
|
||
|
INNER JOIN system_role role on ur.role_id = role.id
|
||
|
where role.code = #{roleCode}
|
||
|
<if test="searchValue !=null and searchValue!=''">
|
||
|
and (mobile like concat('%',#{searchValue},'%') or nickname like concat('%',#{searchValue},'%') )
|
||
|
</if>
|
||
|
<if test="deptIds !=null and deptIds.size()>0">
|
||
|
AND su.dept_id in
|
||
|
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
||
|
#{deptId}
|
||
|
</foreach>
|
||
|
</if>
|
||
|
</select>
|
||
|
</mapper>
|