<?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.zm.order.tool.server.tempdb.OrderWuYinJiFenDao">

    <resultMap id="JuiceOrderMap" type="com.zm.order.tool.server.model.OrderWuyinJiFen">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
        <result column="order_at" jdbcType="TIMESTAMP" property="orderAt"/>
        <result column="item_name" jdbcType="VARCHAR" property="itemName"/>
        <result column="point" jdbcType="VARCHAR" property="point"/>
        <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
        <result column="user_id" jdbcType="BIGINT" property="userId"/>
    </resultMap>

    <sql id="tb">
        order_wuyin_jifeng
    </sql>

    <sql id="cols_all">
        id,
        order_no,
        order_at,
        item_name,
        point,
        mobile,
        user_id
    </sql>

    <select id="selectList" parameterType="map" resultMap="JuiceOrderMap">
        select
        <include refid="cols_all"/>
        from
        <include refid="tb"/>
        <where>
            <if test="lastId != null">
                id > #{lastId}
            </if>
        </where>
            order by id asc limit #{size}
    </select>
</mapper>