| | |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | <if test="params.deptId != null"> |
| | | <if test="deptId != null"> |
| | | AND u.user_id IN |
| | | ( |
| | | SELECT user_id FROM sys_user_dept WHERE dept_id = #{deptId} |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 根据岗位编码查询用户列表 --> |
| | | <select id="selectUserListByPostCode" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT DISTINCT u.user_id, u.user_name, u.nick_name, u.phonenumber, u.status, u.tenant_id |
| | | FROM sys_user u |
| | | LEFT JOIN sys_user_post up ON u.user_id = up.user_id |
| | | LEFT JOIN sys_post p ON up.post_id = p.post_id |
| | | WHERE u.del_flag = '0' |
| | | AND u.status = '0' |
| | | AND p.post_code = #{postCode} |
| | | AND p.status = '0' |
| | | </select> |
| | | |
| | | </mapper> |