| | |
| | | </select> |
| | | |
| | | <select id="userByPlanId" parameterType="String" resultMap="SysUserResult"> |
| | | select * from sys_user where user_id in (select app_user_id from ard_app_patroluser where patrolplan_id = #{id}) |
| | | select user_id,nick_name from sys_user where user_id in (select app_user_id from ard_app_patroluser where patrolplan_id = #{id}) |
| | | </select> |
| | | |
| | | <select id="getOnlineCommander" parameterType="String" resultMap="SysUserResult"> |
| | | select distinct su0.* from sys_user su |
| | | inner join sys_user su0 on su.dept_id = su0.dept_id |
| | | inner join sys_user_role aur on su0.user_id = aur.user_id |
| | | inner join sys_role sr on aur.role_id = sr.role_id |
| | | where su.user_id = #{usersId} and su0.user_id != #{usersId} |
| | | and sr.role_key = 'appLeader' and su0.app_online_state = '1' |
| | | </select> |
| | | |
| | | <select id="getOnlinePC" resultMap="SysUserResult"> |
| | | select distinct su0.* from sys_user su |
| | | inner join sys_user su0 on su.dept_id = su0.dept_id |
| | | inner join sys_user_role aur on su0.user_id = aur.user_id |
| | | inner join sys_role sr on aur.role_id = sr.role_id |
| | | where su.user_id = #{usersId} and su0.user_id != #{usersId} |
| | | and sr.role_key != 'appLeader' and sr.role_key != 'appUser' |
| | | and su0.user_id in |
| | | <foreach collection="onLinePCIdList" item="userId" open="(" close=")" separator=","> |
| | | #{userId} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |