| | |
| | | <result property="roleName" column="roleName"></result> |
| | | <result property="containerCodeList" column="containerCodeList"></result> |
| | | <result property="project" column="project"></result> |
| | | <result property="url" column="url"></result> |
| | | <result property="score" column="score"></result> |
| | | <result property="waster" column="waster" typeHandler="com.nanometer.smartlab.entity.handler.WasterHandler"></result> |
| | | </resultMap> |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSysUserSimpleInfoList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select su.id,su.arp,su.account,su.name,su.phone,su.email,su.create_time,su.project,bm.meta_value as department,bm1.meta_value as company 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 |
| | | <include refid="queryWhereSql"/> |
| | | order by su.arp ASC |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getHasProjectSysUserList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select DISTINCT su.*, br.name as roleName from sys_user as su |
| | | left join base_role as br on su.role_id = br.id inner join sys_project as sp on su.id=sp.sys_user_id |
| | | where su.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | <if test="department != null and department != ''"> |
| | | and su.department = #{department} |
| | | </if> |
| | | <if test="approverFlag != null"> |
| | | and su.approver_flag = #{approverFlag} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and (su.project like concat('%',#{project},'%') |
| | | or su.project is null or su.project = '') |
| | | </if> |
| | | order by su.arp ASC |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | |
| | | </select> |
| | | |
| | | <select id="getSysUserInfoList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,u.point,group_concat(container_code SEPARATOR ',') containerCodeList ,u.arp, bm1.meta_value department,bm2.meta_value company,u.project_id projectId from sys_user u |
| | | select u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,u.point,group_concat(container_code SEPARATOR ',') containerCodeList ,u.arp, bm1.meta_value department,bm2.meta_value company,u.project_id projectId, |
| | | u.url,u.score |
| | | from sys_user u |
| | | left join sys_laboratory l on l.department = u.department and l.valid_flag = 1 |
| | | left join sys_laboratory_container c on c.laboratory_id = l.id and c.valid_flag = 1 |
| | | left join base_meta bm1 on bm1.id = u.department |
| | |
| | | </select> |
| | | |
| | | <insert id="insertSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time,project,waster) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now(),#{project},#{waster}) |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time,project,waster,url,score) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now(),#{project},#{waster},#{url},#{score}) |
| | | </insert> |
| | | |
| | | <update id="updateSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | update sys_user set arp=#{arp}, account=#{account}, password=#{password}, company=#{company}, department=#{department}, name=#{name}, phone=#{phone}, |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now(),project=#{project},waster=#{waster} |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now(),project=#{project},waster=#{waster}, |
| | | url= #{url}, |
| | | score = #{score} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | and su.email is not null |
| | | and su.email != '' |
| | | </select> |
| | | <select id="getUserByName" resultMap="SysUser"> |
| | | select * from sys_user |
| | | where name = #{name} and valid_flag = 1 |
| | | </select> |
| | | <update id="updateUserPointBySelective" parameterType="java.util.Map"> |
| | | update sys_user set point=#{point} |
| | | <where> |