<?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.coupon.mapper.CouponUserMapper">
    <select id="listToMongodb" resultType="com.tmerclub.cloud.coupon.model.CouponUser">
        select cu.*, c.shop_id
        from coupon_user cu
        left join coupon c on c.coupon_id = cu.coupon_id
        order by coupon_user_id
        limit #{start}, #{size}
    </select>
</mapper>
