<?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.tmerclub.cloud.group.mapper.GroupOrderMapper">
    <resultMap id="groupOrderMap" type="com.tmerclub.cloud.group.model.GroupOrder">
        <id column="group_order_id" property="groupOrderId"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="shop_id" property="shopId"/>
        <result column="group_team_id" property="groupTeamId"/>
        <result column="user_id" property="userId"/>
        <result column="identity_type" property="identityType"/>
        <result column="activity_prod_price" property="activityProdPrice"/>
        <result column="pay_price" property="payPrice"/>
        <result column="order_id" property="orderId"/>
        <result column="status" property="status"/>
    </resultMap>
    <sql id="Vo_Column_List">
        `group_order_id`,
        group_activity_id,
        `create_time`,
        `update_time`,
        `shop_id`,
        `group_team_id`,
        `user_id`,
        `identity_type`,
        `activity_prod_price`,
        `pay_price`,
        `order_id`,
        `status`,
        `count`
    </sql>
    <select id="listToMongodb" resultType="com.tmerclub.cloud.group.bo.mongo.MongoGroupOrderBO">
        SELECT go.*
        FROM group_order go
        order by go.create_time
        limit #{start}, #{size}
    </select>
</mapper>
