| | |
| | | <if test="seeFlag != null"> |
| | | and su.see_flag = #{seeFlag} |
| | | </if> |
| | | <if test="seeFlag != null"> |
| | | and su.see_flag = #{seeFlag} |
| | | </if> |
| | | <if test="editId != null and editId != ''"> |
| | | and su.id != #{editId} |
| | | </if> |
| | |
| | | select * from sys_user |
| | | where arp = #{0} and valid_flag = 1 |
| | | </select> |
| | | <select id="getUserCountInProject" parameterType="java.util.Map" resultType="java.lang.Integer"> |
| | | select count(1) from sys_user as su |
| | | left join base_meta bm on su.department = bm.id |
| | | left join base_meta bm1 on bm1.id = su.company |
| | | where su.valid_flag = 1 |
| | | <if test="departmentNameLike != null and departmentNameLike != ''"> |
| | | and bm.meta_value like concat("%",#{departmentNameLike},"%") |
| | | </if> |
| | | <if test="arp != null and arp != ''"> |
| | | and su.arp like concat("%",#{arp},"%") |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and su.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="company != null and company != ''"> |
| | | and bm1.meta_value like concat("%",#{company},"%") |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and |
| | | <foreach item="item" index="index" collection="project.split(',')" open="(" separator="or" close=")"> |
| | | su.project like concat("%",#{item},"%") |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="getUserInProject" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select su.*, br.name as roleName from sys_user as su |
| | | left join base_role as br on su.role_id = br.id |
| | | left join base_meta bm on su.department = bm.id |
| | | left join base_meta bm1 on bm1.id = su.company |
| | | where su.valid_flag = 1 |
| | | <if test="departmentNameLike != null and departmentNameLike != ''"> |
| | | and bm.meta_value like concat("%",#{departmentNameLike},"%") |
| | | </if> |
| | | <if test="arp != null and arp != ''"> |
| | | and su.arp like concat("%",#{arp},"%") |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and su.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="company != null and company != ''"> |
| | | and bm1.meta_value like concat("%",#{company},"%") |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and |
| | | <foreach item="item" index="index" collection="project.split(',')" open="(" separator="or" close=")"> |
| | | su.project like concat("%",#{item},"%") |
| | | </foreach> |
| | | </if> |
| | | order by su.arp ASC |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | <update id="updateUserPointBySelective" parameterType="java.util.Map"> |
| | | update sys_user set point=#{point} |
| | | <where> |