|
@@ -2188,7 +2188,7 @@
|
|
|
sum(total_regimental_settle_amount) as 'totalRegimentalSettleAmount',
|
|
|
IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN total_regimental_settle_amount ELSE 0 END), 0) AS
|
|
|
'voucherTotalRegimentalSettleAmount'
|
|
|
- from promoter_item_order_count
|
|
|
+ from promoter_item_order_count1
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and stat_date >= #{start}
|
|
@@ -2263,7 +2263,7 @@
|
|
|
sum(order_amount) as 'orderAmount',
|
|
|
sum(regimental_promotion_amount) as 'regimentalPromotionAmount',
|
|
|
sum(total_regimental_settle_amount) as 'totalRegimentalSettleAmount'
|
|
|
- from promoter_item_order_count
|
|
|
+ from promoter_item_order_count1
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and stat_date >= #{start}
|
|
@@ -2304,7 +2304,7 @@
|
|
|
sum(order_amount) as 'orderAmount',
|
|
|
sum(regimental_promotion_amount) as 'regimentalPromotionAmount',
|
|
|
sum(total_regimental_settle_amount) as 'totalRegimentalSettleAmount'
|
|
|
- from promoter_item_order_count
|
|
|
+ from promoter_item_order_count1
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and stat_date >= #{start}
|
|
@@ -2349,7 +2349,7 @@
|
|
|
sum(order_amount) as 'orderAmount',
|
|
|
sum(regimental_promotion_amount) as 'regimentalPromotionAmount',
|
|
|
sum(total_regimental_settle_amount) as 'totalRegimentalSettleAmount'
|
|
|
- from promoter_item_order_count
|
|
|
+ from promoter_item_order_count1
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and stat_date >= #{start}
|
|
@@ -2425,7 +2425,7 @@
|
|
|
sum(total_regimental_settle_amount) as 'totalRegimentalSettleAmount',
|
|
|
IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN total_regimental_settle_amount ELSE 0 END), 0) AS
|
|
|
'voucherTotalRegimentalSettleAmount'
|
|
|
- from promoter_item_order_count
|
|
|
+ from promoter_item_order_count1
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and stat_date >= #{start}
|
|
@@ -2727,14 +2727,14 @@
|
|
|
select t.*,tt.sampleCount
|
|
|
from (select t1.user_id as 'collectSampleId',
|
|
|
t1.user_name as 'collectSampleName',
|
|
|
- sum(t2.order_num) as 'orderNum',
|
|
|
- sum(t2.valid_order_num) as 'validOrderNum',
|
|
|
- concat(round(sum(t2.valid_order_num) / sum(t2.order_num) * 100, 2), '%') as 'validOrderRate',
|
|
|
+ count(t2.oid) as 'orderNum',
|
|
|
+ sum(case when t2.order_status != 80 then 1 else 0 end) as 'validOrderNum',
|
|
|
+ concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as 'validOrderRate',
|
|
|
round(sum(t2.order_amount) / 100, 2) as 'orderAmount',
|
|
|
round(sum(t2.regimental_promotion_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
|
round(sum(t2.total_regimental_settle_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
|
from promoter_bind_channel_date t1
|
|
|
- left join promoter_item_order_count t2
|
|
|
+ left join kuaishou_supply_chain t2
|
|
|
on t1.promoter_id = t2.promoter_id and t1.stat_date = t2.stat_date
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != '' ">
|
|
@@ -2758,14 +2758,14 @@
|
|
|
from (select t1.promoter_id as 'promoterId',
|
|
|
t1.promoter_name as 'promoterName',
|
|
|
t1.promoter_url as 'promoterUrl',
|
|
|
- sum(t2.order_num) as 'orderNum',
|
|
|
- sum(t2.valid_order_num) as 'validOrderNum',
|
|
|
- concat(round(sum(t2.valid_order_num) / sum(t2.order_num) * 100, 2), '%') as 'validOrderRate',
|
|
|
+ count(t2.oid) as 'orderNum',
|
|
|
+ sum(case when t2.order_status != 80 then 1 else 0 end) as 'validOrderNum',
|
|
|
+ concat(round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid) * 100, 2), '%') as 'validOrderRate',
|
|
|
round(sum(t2.order_amount) / 100, 2) as 'orderAmount',
|
|
|
round(sum(t2.regimental_promotion_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
|
round(sum(t2.total_regimental_settle_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
|
from promoter_bind_channel_date t1
|
|
|
- left join promoter_item_order_count t2
|
|
|
+ left join kuaishou_supply_chain t2
|
|
|
on t1.promoter_id = t2.promoter_id and t1.stat_date = t2.stat_date
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != '' ">
|