<?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.ChannelCartMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qs.mp.channel.domain.ChannelCart">
        <id column="cart_id" property="cartId" />
        <result column="channel_id" property="channelId" />
        <result column="box_id" property="boxId" />
        <result column="order_num" property="orderNum" />
        <result column="created_time" property="createdTime" />
        <result column="updated_time" property="updatedTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        cart_id, channel_id, box_id, order_num, created_time, updated_time
    </sql>

    <select id="listCartVO" resultType="com.qs.mp.channel.domain.vo.ChannelCartVO">
        select t1.cart_id, t1.order_num, t2.*
        from mp_channel_cart t1
        left join mp_ticket_box t2 on t1.box_id = t2.box_id
            ${ew.customSqlSegment}
    </select>

</mapper>
