diff --git a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml
index 95cebe1be..6f95e6549 100644
--- a/mallinkService/src/main/resources/mapper/WxCouponMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxCouponMapper.xml
@@ -104,7 +104,7 @@
and `valid_start_date` = #{validStartDate}
-
+
and `valid_end_date` = #{validEndDate}
@@ -731,16 +731,16 @@
left join wx_card_transfer_info wcs on wcs.coupon_order_id = ci.id
where wc.id = c.id) as transfer_count,
- (select sum(round(ci.sale_amount/100,2)) from wx_card_info ci
+ (select sum(ci.sale_amount) from wx_card_info ci
left join wx_coupon wc on wc.id = ci.coupon_id
where wc.id = c.id) as sale_amount,
- (select sum(round(wcs.real_payment/100,2)) from wx_card_info ci
+ (select sum(wcs.real_payment) from wx_card_info ci
left join wx_coupon wc on wc.id = ci.coupon_id
left join wx_card_spend wcs on wcs.card_id = ci.id
where wc.id = c.id) as sum_payment,
- (select sum(round(sc.subsidy/100,2)) from wx_card_info ci
+ (select sum(sc.subsidy) from wx_card_info ci
left join wx_coupon wc on wc.id = ci.coupon_id
left join wx_merchant_subsidy sc on sc.coupon_order_id = ci.id
where wc.id = c.id) as sum_subsidy
@@ -760,7 +760,7 @@
(select count(wco.id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count,
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 1 and wc.id = c.id) as sum_payment,
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 3 and wc.id = c.id) as backpay_count,
- (select sum(round(sc.subsidy/100,2)) from wx_coupon wc
+ (select sum(sc.subsidy) from wx_coupon wc
left join wx_coupon_order wo on wo.coupon_id = wc.id
left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id
where wc.id = c.id) as sum_subsidy
@@ -790,7 +790,7 @@
(select count(wo.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
- where wo.order_status = 7 and wc.id = c.id) as press_succ_count,
+ where wo.order_status = 1 and wc.id = c.id) as press_succ_count,
(select count(wop.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
@@ -902,7 +902,7 @@
@@ -918,7 +918,7 @@
round(
(select count(wo.id) from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
- where wo.order_status = 7 and wc.type = 8
+ where wo.order_status = 1 and wc.type = 8
and wo.create_date between #{startdate} and #{enddate})
/
(select count(wop.id) from wx_coupon wc