|
|
|
@@ -99,25 +99,16 @@ |
|
|
|
<select id="queryOrderGroupMarketingList" parameterType="com.iformall.domain.vo.WxOrderGroupMarketing" |
|
|
|
resultType="com.iformall.domain.vo.WxOrderGroupMarketing"> |
|
|
|
select c.tenant_id,coupon_id,c.cover_img,title,c.price,c.sale_price,c.group_total_count,c.group_success_count, |
|
|
|
ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100) |
|
|
|
CONCAT(ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100),'%') |
|
|
|
group_transfer_ratio,c.success_people,c.verify_count, |
|
|
|
ROUND(IFNULL((verify_count/success_people),0)*100) verify_ratio,c.total_people from( |
|
|
|
CONCAT(ROUND(IFNULL((verify_count/success_people),0)*100),'%') verify_ratio,c.total_people from( |
|
|
|
select tenant_id,id coupon_id,cover_img,title,FORMAT(price/100,2) price,FORMAT(sale_price/100,2) sale_price, |
|
|
|
(select count(*) total from wx_order_group where coupon_id=c.id) group_total_count, |
|
|
|
(select count(*) total from wx_order_group where status=11 and coupon_id=c.id) group_success_count, |
|
|
|
IFNULL((select success.total from ( |
|
|
|
select count(success.product_id) total,success.product_id from ( |
|
|
|
select product_id,c_user_id from wx_order |
|
|
|
where order_status=11 |
|
|
|
group by product_id,c_user_id) success |
|
|
|
group by success.product_id) success where success.product_id=c.id),0) success_people, |
|
|
|
IFNULL((select count(*) from wx_order where order_status=11 and product_id=c.id),0) success_people, |
|
|
|
(select count(*) total |
|
|
|
from wx_coupon_order where coupon_type=9 and coupon_order_status=1 and coupon_id=c.id) verify_count, |
|
|
|
IFNULL((select success.total from ( |
|
|
|
select count(success.product_id) total,success.product_id from ( |
|
|
|
select product_id,c_user_id from wx_order |
|
|
|
group by product_id,c_user_id) success |
|
|
|
group by success.product_id) success where success.product_id=c.id),0) total_people |
|
|
|
IFNULL((select count(*) from wx_order where order_group_id!=0 and product_id=c.id),0) total_people |
|
|
|
from wx_coupon c where type=9 |
|
|
|
) c |
|
|
|
<where> |
|
|
|
|