浏览代码

管理层人员条件查询

lamphua 1 个月前
父节点
当前提交
14f06da3de
共有 1 个文件被更改,包括 33 次插入0 次删除
  1. 33
    0
      oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml

+ 33
- 0
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml 查看文件

70
 		left join sys_user_post up on u.user_id = up.user_id
70
 		left join sys_user_post up on u.user_id = up.user_id
71
 		left join sys_post p on up.post_id = p.post_id
71
 		left join sys_post p on up.post_id = p.post_id
72
 		where p.post_name = "秘书"
72
 		where p.post_name = "秘书"
73
+		<if test="userId != null and userId != 0">
74
+			AND u.user_id = #{userId}
75
+		</if>
76
+		<if test="userName != null and userName != ''">
77
+			AND u.user_name like concat('%', #{userName}, '%')
78
+		</if>
79
+		<if test="nickName != null and nickName != ''">
80
+			AND u.nick_name like concat('%', #{nickName}, '%')
81
+		</if>
82
+		<if test="status != null and status != ''">
83
+			AND u.status = #{status}
84
+		</if>
85
+		<if test="phonenumber != null and phonenumber != ''">
86
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
87
+		</if>
88
+		<if test="degree != null and degree != ''">
89
+			AND u.degree = #{degree}
90
+		</if>
91
+		<if test="titles != null and titles != ''">
92
+			AND find_in_set(#{titles}, u.titles)
93
+		</if>
94
+		<if test="certificates != null and certificates != ''">
95
+			AND find_in_set(#{certificates}, u.certificates)
96
+		</if>
73
 	</select>
97
 	</select>
74
 
98
 
75
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
99
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
94
 		<if test="phonenumber != null and phonenumber != ''">
118
 		<if test="phonenumber != null and phonenumber != ''">
95
 			AND u.phonenumber like concat('%', #{phonenumber}, '%')
119
 			AND u.phonenumber like concat('%', #{phonenumber}, '%')
96
 		</if>
120
 		</if>
121
+		<if test="degree != null and degree != ''">
122
+			AND u.degree = #{degree}
123
+		</if>
124
+		<if test="titles != null and titles != ''">
125
+			AND find_in_set(#{titles}, u.titles)
126
+		</if>
127
+		<if test="certificates != null and certificates != ''">
128
+			AND find_in_set(#{certificates}, u.certificates)
129
+		</if>
97
 	</select>
130
 	</select>
98
 
131
 
99
 	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">
132
 	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">

正在加载...
取消
保存