<?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.trade.service.trade.salesorder.mapper.SalesOrderContainerMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.trade.service.trade.salesorder.domain.SalesOrderContainer">
        <result column="id" property="id" />
        <result column="deleted" property="deleted" />
        <result column="logistics_id" property="logisticsId" />
        <result column="bill_no" property="billNo" />
        <result column="file_id" property="fileId" />
        <result column="gmt_create" property="gmtCreate" />
        <result column="gmt_modified" property="gmtModified" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,
        deleted,
        logistics_id, bill_no, file_id, gmt_create, gmt_modified
    </sql>
    <select id="listByLogisticsId" resultType="com.trade.service.trade.salesorder.vo.SalesOrderContainerVO">
        SELECT
        <include refid="Base_Column_List"/>
        FROM
        sales_order_container
        WHERE
        logistics_id = #{logisticsId}
        AND deleted = 0
    </select>

</mapper>
