ProjectUserMapper.xml 1.0 KB

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="cn.com.ty.lift.business.project.dao.mapper.ProjectUserMapper" >
  4. <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.project.dao.entity.ProjectUser" >
  5. <id column="project_id" property="projectId" jdbcType="BIGINT" />
  6. <id column="user_id" property="userId" jdbcType="BIGINT" />
  7. <id column="user_role" property="userRole" jdbcType="TINYINT" />
  8. <result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
  9. <result column="is_monitor" property="isMonitor" jdbcType="TINYINT" />
  10. </resultMap>
  11. <sql id="Base_Column_List" >
  12. project_id, user_id, user_role, mt_company_id, is_monitor
  13. </sql>
  14. <select id="findUserListById" resultMap="BaseResultMap" parameterType="java.lang.Long">
  15. select
  16. <include refid="Base_Column_List"></include>
  17. from project_user
  18. where project_id = #{projectId,jdbcType=BIGINT}
  19. </select>
  20. </mapper>