| | |
| | | and su.status = '0' and su.del_flag = '0' |
| | | order by su.dept_id asc |
| | | </select> |
| | | |
| | | <select id="selectUserByDeptIdList" resultMap="SysUserOnlyResult"> |
| | | select * from sys_user su where su.dept_id in |
| | | <foreach collection="deptIdList" item="deptId" open="(" close=")" separator=","> |
| | | #{deptId} |
| | | </foreach> |
| | | and su.status = '0' |
| | | </select> |
| | | |
| | | <select id="selectUserIdByCarId" resultType="java.lang.String"> |
| | | select user_id from sys_user where dept_id in ( |
| | | with recursive rsd as ( |
| | | select * from sys_dept sd where sd.dept_id = ( |
| | | select dept_id from ard_sy_car where car_id = #{carId}) |
| | | union |
| | | select psd.* from sys_dept psd inner join rsd on rsd.parent_id = psd.dept_id |
| | | ) |
| | | select rsd.dept_id from rsd) |
| | | </select> |
| | | <select id="selectUsersByIds" parameterType="list" resultType="SysUser"> |
| | | SELECT * FROM sys_user |
| | | WHERE user_id IN |
| | | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| | | #{userId} |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |