Explorar el Código

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

release_toaliyun_real
luozukai hace 7 años
padre
commit
27602cbef8
Se han modificado 1 ficheros con 8 adiciones y 8 borrados
  1. +8
    -8
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml

+ 8
- 8
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Ver fichero

@@ -104,7 +104,7 @@
<if test=" null != validStartDate ">
and `valid_start_date` = #{validStartDate}
</if>
<if test=" null != validEndDate ">
and `valid_end_date` = #{validEndDate}
</if>
@@ -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 @@
<select id="pressSuccHistory" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon">
select DATE_FORMAT(wo.create_date,'%Y-%m-%d') xtime,count(wo.id) xcount from wx_coupon wc
left join wx_order wo on wo.product_id = wc.id
where wc.type = 8 and wo.order_status = 7
where wc.type = 8 and wo.order_status = 1
and wo.create_date between #{startdate} and #{enddate}
group by xtime
</select>
@@ -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


Cargando…
Cancelar
Guardar