<?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.qs.mp.channel.mapper.ChannelOrderItemMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qs.mp.channel.domain.ChannelOrderItem">
        <id column="id" property="id" />
        <result column="order_id" property="orderId" />
        <result column="channel_id" property="channelId" />
        <result column="title" property="title" />
        <result column="pic_url" property="picUrl" />
        <result column="box_id" property="boxId" />
        <result column="properties" property="properties" />
        <result column="pkg_unit" property="pkgUnit" />
        <result column="face_price" property="facePrice" />
        <result column="order_num" property="orderNum" />
        <result column="pkg_sale_price" property="pkgSalePrice" />
        <result column="created_time" property="createdTime" />
        <result column="updated_time" property="updatedTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, order_id, channel_id, title, pic_url, box_id, properties, pkg_unit, face_price, order_num, sale_price, created_time, updated_time
    </sql>


    <!-- 查询订单明细列表 -->
    <select id="listChannelOrderItemVO" resultType="com.qs.mp.channel.domain.vo.ChannelOrderItemVO">
		select t1.* , t2.box_no boxNo
		from mp_channel_order_item t1
		left join mp_ticket_box t2 on t1.box_id = t2.box_id
		${ew.customSqlSegment}
	</select>
	
</mapper>
