<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dayou.mapper.ItemStageUserMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.dayou.entity.ItemStageUser">
        <result column="id" property="id" />
        <result column="user_id" property="userId" />
        <result column="item_id" property="itemId" />
        <result column="stage_id" property="stageId" />
        <result column="weight" property="weight" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,
        user_id, item_id, stage_id, weight
    </sql>

    <select id="getList" parameterType="java.lang.Long" resultType="com.dayou.vo.ItemStageUserVO">
        select isu.weight,u.name as userName,isu.id from item_stage_user isu left join user u on u.id = isu.user_id
where u.deleted = 0 and isu.stage_id = #{stageId}
    </select>
</mapper>
