| | |
| | | <result property="projectId" column="project_id"></result> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SysUserDto" type="com.nanometer.smartlab.entity.dto.SysUserDto"> |
| | | <id property="id" column="id"/> |
| | | <result property="arp" column="arp"/> |
| | | <result property="account" column="account"/> |
| | | <result property="department" column="department"/> |
| | | <result property="name" column="name"/> |
| | | <result property="point" column="point"/> |
| | | <collection property="sysLaboratory" ofType="com.nanometer.smartlab.entity.dto.SysLaboratoryDto" fetchType="lazy"> |
| | | <id property="id" column="sl_id"/> |
| | | <result property="name" column="sl_name"/> |
| | | <collection property="sysLaboratoryContainer" ofType="com.nanometer.smartlab.entity.dto.SysLaboratoryContainerDto" fetchType="lazy"> |
| | | <id property="id" column="slc_id"/> |
| | | <result property="name" column="slc_name"/> |
| | | </collection> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <sql id="queryWhereSql"> |
| | | <if test="arp != null and arp != ''"> |
| | | and su.arp like #{arp} |
| | |
| | | <select id="selectByAccount" parameterType="com.nanometer.smartlab.entity.SysUser" resultMap="SysUser"> |
| | | select * from sys_user where valid_flag=1 and account=#{account} |
| | | </select> |
| | | <select id="selectUserInfo" resultMap="SysUserDto"> |
| | | SELECT |
| | | su.id, |
| | | su.arp, |
| | | su.account, |
| | | su.`name`, |
| | | su.point, |
| | | bm1.meta_value department, |
| | | sl.id sl_id, |
| | | sl.`name` sl_name, |
| | | slc.id slc_id, |
| | | slc.`name` slc_name |
| | | FROM |
| | | sys_user su |
| | | LEFT JOIN base_meta bm1 on bm1.id = su.department |
| | | LEFT JOIN sys_laboratory sl on sl.department = su.department |
| | | LEFT JOIN sys_laboratory_container slc on slc.laboratory_id = sl.id |
| | | |
| | | |
| | | |
| | | WHERE su.valid_flag = 1 |
| | | and sl.valid_flag = 1 |
| | | and slc.valid_flag = 1 |
| | | |
| | | </select> |
| | | |
| | | <update id="updateUserPointBySelective" parameterType="java.util.Map"> |
| | | update sys_user set point=#{point} |