<?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.picc.grab.mapper.ZbwtjlMapper">

	<!-- 通用查询映射结果 -->
	<resultMap id="BaseResultMap" type="com.picc.grab.domain.Zbwtjl">
		<id column="id" property="id" />
		<result column="zbwtid" property="zbwtid" />
		<result column="type" property="type" />
		<result column="czr" property="czr" />
		<result column="memo" property="memo" />
		<result column="create_time" property="createTime" />
	</resultMap>

	<!--查询中标委托记录集合-->
	<select id="findZbwtjlList" resultType="com.picc.grab.domain.Zbwtjl" resultMap="BaseResultMap">
		SELECT z.*,u.trueName czrName
		FROM md_zbwtjl z
		LEFT JOIN md_user u ON z.czr = u.id
		WHERE z.zbwtid = #{dto.zbwtid}
		ORDER BY z.create_time DESC
	</select>
</mapper>
