<?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.sunxung.factoring.mapper.purchcontractmanagement.PurchContractSettlePaymentMapper">
	<resultMap type="com.sunxung.factoring.entity.purchcontractmanagement.PurchContractSettlePayment" id="baseResultMap">
		<result property="id" column="id" />
		<result property="purchContractBasicInfoId" column="purch_contract_basic_info_id" />
		<result property="bankName" column="bank_name" />
		<result property="bankAccount" column="bank_account" />
		<result property="bankAccountName" column="bank_account_name" />
		<result property="userCreate" column="user_create" />
		<result property="userModified" column="user_modified" />
		<result property="gmtCreate" column="gmt_create" />
		<result property="gmtModified" column="gmt_modified" />

	</resultMap>


	<resultMap id="dictionaryResult" type="Dictionary">
		<result property="id" column="did" />
		<result property="name" column="dname" />
		<result property="code" column="dcode" />
	</resultMap>


	<select id="findByPurchContBasicId" parameterType="java.lang.Long" resultMap="baseResultMap">
		SELECT
			t1.id,
			t1.c_purch_contract_basic_info_id,
			t1.user_create,
			t1.user_modified,
			t1.gmt_create,
			t1.gmt_modified,
		    t1.bank_name,
		    t1.bank_account,
		    t1.bank_account_name
		FROM
			c_purch_contract_settle_payment t1
		WHERE t1.c_purch_contract_basic_info_id = #{id}
	</select>

</mapper>
