<?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.hc.business.mapper.OrderAttachmentMapper">

    <resultMap type="com.hc.business.model.OrderAttachment" id="OrderAttachmentMap">
        <result property="attchementId" column="attchement_id" jdbcType="INTEGER"/>
        <result property="orderId" column="order_id" jdbcType="INTEGER"/>
        <result property="attachmentUrl" column="attachment_url" jdbcType="VARCHAR"/>
        <result property="payCompany" column="pay_company" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        attchement_id,
           order_id,
           attachment_url,
            pay_company,
           create_time
    </sql>

    <select id="queryByOrderId" resultType="com.hc.business.model.OrderAttachment">
        SELECT
        <include refid="Base_Column_List"/>
        FROM order_attachment
        WHERE order_id =#{orderId}

    </select>


</mapper>
