携程优惠券记录筛选

master
yangkai 6 years ago
parent ad3f353e49
commit cc6d0ed83d

@ -29,6 +29,5 @@ public interface CouponAccuessLogMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> findCouponByOrderId(@Param("order_id") String order_id); List<JSONObject> findCouponByOrderId(@Param("order_id") String order_id);
@AutoSql(type = SqlType.SELECT)
PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, PageBounds pageBounds); PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, PageBounds pageBounds);
} }

@ -0,0 +1,13 @@
<?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="au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper">
<select id="getCouponAccuessLog" resultType="com.alibaba.fastjson.JSONObject">
SELECT
accuess_id,client_id,customer_openid,order_id,
TRIM(LEADING 'CTRIP_' FROM coupon_id) coupon_id,
coupon_deal_amount,min_pay_amount,currency,creation_date,
last_update_date,is_valid,transaction_id,transaction_refund_id,refund_id
FROM cus_coupon_accuess_log
WHERE locate("CTRIP_",coupon_id) AND client_id = #{client_id}
</select>
</mapper>
Loading…
Cancel
Save