Browse Source

[营销分析][添加][卡营销列表]

release_toaliyun_real
luozukai 7 years ago
parent
commit
f9d16d9495
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 3
- 3
mallinkService/src/main/resources/mapper/WxCouponMapper.xml View File

@@ -680,7 +680,7 @@
</update> </update>


<select id="findSaleMoneyByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon"> <select id="findSaleMoneyByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount) xcount from wx_card_info ci
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(ci.sale_amount/100) xcount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id left join wx_coupon c on c.id = ci.coupon_id
where c.type = 100 where c.type = 100
and ci.create_date between #{startdate} and #{enddate} and ci.create_date between #{startdate} and #{enddate}
@@ -688,7 +688,7 @@
</select> </select>


<select id="findPaymentByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon"> <select id="findPaymentByDate" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(wcs.payment) xcount from wx_card_info ci
select DATE_FORMAT(ci.create_date,'%Y-%m-%d') xtime,sum(wcs.deduction_amount/100) xcount from wx_card_info ci
left join wx_coupon c on c.id = ci.coupon_id left join wx_coupon c on c.id = ci.coupon_id
left join wx_card_spend wcs on wcs.card_id = ci.id left join wx_card_spend wcs on wcs.card_id = ci.id
where c.type = 100 where c.type = 100
@@ -739,7 +739,7 @@
left join wx_card_spend wcs on wcs.card_id = ci.id left join wx_card_spend wcs on wcs.card_id = ci.id
where wc.id = c.id) as sum_payment, where wc.id = c.id) as sum_payment,


(select sum(sc.subsidy) from wx_card_info ci
(select sum(sc.subsidy/100) from wx_card_info ci
left join wx_coupon wc on wc.id = ci.coupon_id left join wx_coupon wc on wc.id = ci.coupon_id
left join wx_merchant_subsidy sc on sc.coupon_order_id = ci.id left join wx_merchant_subsidy sc on sc.coupon_order_id = ci.id
where wc.id = c.id) as sum_subsidy where wc.id = c.id) as sum_subsidy


Loading…
Cancel
Save