文件名从 assess-system/src/main/resources/mapper/system/SysUserMapper.xml 修改 |
| | |
| | | <result property="expertType" column="expert_type" /> |
| | | <result property="jobTitle" column="job_title" /> |
| | | <result property="major" column="major" /> |
| | | <result property="level" column="level" /> |
| | | <result property="idPhoto" column="id_photo" /> |
| | | <result property="certificateNo" column="certificate_no" /> |
| | | <result property="state" column="state" /> |
| | | <result property="loginIp" column="login_ip" /> |
| | | <result property="loginDate" column="login_date" /> |
| | |
| | | <collection property="socialAttach" ofType="com.gkhy.assess.system.domain.SysAttach" select="getSocialAttachByUserId" column="{userId=id}"/> |
| | | <collection property="medicalAttach" ofType="com.gkhy.assess.system.domain.SysAttach" select="getMedicalAttachByUserId" column="{userId=id}"/> |
| | | <collection property="salaryAttach" ofType="com.gkhy.assess.system.domain.SysAttach" select="getSalaryAttachByUserId" column="{userId=id}"/> |
| | | <collection property="majorNames" ofType="java.lang.String" select="getMajorById" column="{major=major}"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectUserVo"> |
| | | select u.id,u.username, u.name,u.identity,u.user_type,u.phone,u.sex,u.status,u.del_flag,u.manage_region,u.expert_type,u.agency_id,u.post,u.job_title,u.major,u.state,u.create_time,u.remark,a.id as agency_id,a.name as agency_name,a.credit_code |
| | | select u.id,u.username, u.name,u.identity,u.user_type,u.phone,u.sex,u.status, |
| | | u.del_flag,u.manage_region,u.expert_type,u.agency_id,u.post,u.job_title, |
| | | u.major,u.state,u.create_time,u.remark,u.level,u.id_photo,u.certificate_no, |
| | | a.id as agency_id,a.name as agency_name,a.credit_code |
| | | from sys_user u |
| | | left join sys_agency a on u.agency_id=a.id |
| | | </sql> |
| | | <delete id="deleteUserById" parameterType="java.lang.Long"> |
| | | update sys_user set del_flag=1 where id=#{userId} |
| | | </delete> |
| | | |
| | | <delete id="deleteUserByIds"> |
| | | update sys_user set del_flag = 1 where id in |
| | | <foreach collection="userIds" item="userId" open="(" separator="," close=")"> |
| | | #{userId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getUserByUsername" resultMap="SysUserResult"> |
| | | select id,username,name,password,salt,identity,state,status,del_flag from sys_user |
| | | select id,username,name,password,salt,identity,state,status,del_flag,agency_id,major from sys_user |
| | | where username=#{username} and del_flag=0 |
| | | </select> |
| | | |
| | |
| | | <if test="username != null and username != ''"> |
| | | AND u.username like concat('%', #{username}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | <if test="status != null"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | |
| | | <if test="username != null and username != ''"> |
| | | AND u.username like concat('%', #{username}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | <if test="status != null"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | |
| | | <if test="username != null and username != ''"> |
| | | AND u.username like concat('%', #{username}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | <if test="name != null and name != ''"> |
| | | AND u.name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="status != null"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="level != null and level!=''"> |
| | | AND u.level = #{level} |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | AND u.phone like concat('%', #{phone}, '%') |
| | |
| | | <if test="expertType != null and expertType != ''"> |
| | | AND u.expert_type =#{expertType} |
| | | </if> |
| | | <if test="agencyId != null and agencyId != ''"> |
| | | AND u.agency_id =#{agencyId} |
| | | </if> |
| | | <if test="major != null and major != ''"> |
| | | AND u.major like concat("%",#{major},"%") |
| | | </if> |
| | | <if test="post != null and post != ''"> |
| | | AND u.post =#{post} |
| | | </if> |
| | | |
| | | </where> |
| | | order by u.create_time desc |
| | | </select> |
| | |
| | | |
| | | |
| | | <select id="getUserByPhone" resultMap="SysUserResult"> |
| | | select id,username,name,password,salt,identity,state,status,del_flag from sys_user |
| | | select id,username,name,password,salt,identity,state,status,del_flag,major from sys_user |
| | | where phone=#{phone} and del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getUserByEmail" resultMap="SysUserResult"> |
| | | select id,username,name,password,salt,identity,state,status,del_flag from sys_user |
| | | select id,username,name,password,salt,identity,state,status,del_flag,major from sys_user |
| | | where email=#{email} and del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getUserById" resultMap="SysUserResult"> |
| | | select id,username,name,password,salt,identity,status,del_flag,agency_id from sys_user |
| | | select id,username,name,password,salt,identity,status,del_flag,agency_id,major from sys_user |
| | | where id=#{userId} |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="getUserByUsernamePhone" resultType="com.gkhy.assess.system.domain.SysUser"> |
| | | select id,username,name,password,salt,identity,state,status,del_flag from sys_user |
| | | select id,username,name,password,salt,identity,state,status,del_flag,agency_id from sys_user |
| | | where (username=#{username} or phone=#{username}) and del_flag=0 |
| | | </select> |
| | | |
| | |
| | | select id,name,path,type,user_id,create_time from sys_attach where user_id=#{userId} and type=3 order by create_time desc |
| | | </select> |
| | | |
| | | <select id="getMajorById" resultType="java.lang.String"> |
| | | select label from sys_dict_data where id in |
| | | <foreach item="item" index="index" collection="major.split(',')" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="getUserInfoById" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.id=#{userId} |