DeviceInspectorUserRefMapper.xml 992 B

123456789101112131415161718192021
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zhgd.scs.mapper.DeviceInspectorUserRefMapper">
  6. <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.DeviceInspectorUserRef">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="projectId" column="project_id" jdbcType="BIGINT"/>
  9. <result property="userId" column="user_id" jdbcType="BIGINT"/>
  10. <result property="type" column="type" jdbcType="INTEGER"/>
  11. </resultMap>
  12. <select id="getBindingUser" resultType="com.zhgd.scs.domain.vo.DeviceInspectorUserRefVo">
  13. SELECT su.id userId, su.real_name, su.company,su.position, su.phone , a.id
  14. FROM device_inspector_user_ref a
  15. LEFT JOIN sys_user su ON a.user_id = su.id
  16. WHERE a.project_id = #{projectId} and a.type = #{type}
  17. </select>
  18. </mapper>