| | |
| | | sc.min_amount minAmount, sc.offset_amount offsetAmount, sc.is_all isAll, |
| | | sc.product_ids productIds, sc.attr_ids attrIds, scr.is_using isUsing |
| | | from shop_coupon sc, shop_coupon_record scr |
| | | where sc.shop_id=#{shopId} and sc.id = scr.c_id and scr.user_id = #{userId} and is_using = #{status} |
| | | where sc.company_id=#{companyId} and sc.id = scr.c_id and scr.user_id = #{userId} and is_using = #{status} |
| | | and is_open = 1 |
| | | <if test="status == 2"> |
| | | and now() >= begin_time and end_time >= now() |
| | |
| | | sc.min_amount minAmount, sc.offset_amount offsetAmount, sc.is_all isAll, |
| | | sc.product_ids productIds, sc.attr_ids attrIds, scr.is_using isUsing |
| | | from shop_coupon sc, shop_coupon_record scr |
| | | where sc.shop_id=#{shopId} and sc.id = scr.c_id and scr.user_id = #{userId} |
| | | where sc.company_id=#{companyId} and sc.id = scr.c_id and scr.user_id = #{userId} |
| | | and (isnull(order_id) or order_id = 0) |
| | | and now() > end_time and is_open = 1 |
| | | <if test="pageVo != null"><!-- 判断pageVo对象是否为空 --> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="countUnuseCouponRecord" resultType="java.lang.Integer"> |
| | | select count(*) from shop_coupon_record where user_id = #{userId} and is_using = 2 |
| | | </select> |
| | | |
| | | </mapper> |