|
@@ -180,8 +180,9 @@
|
|
CONCAT(round( sum( CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END ) / count( order_id )*100, 2 ),'%') AS
|
|
CONCAT(round( sum( CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END ) / count( order_id )*100, 2 ),'%') AS
|
|
'validRadio',
|
|
'validRadio',
|
|
sum( total_pay_amount )/100 AS 'payAmount',
|
|
sum( total_pay_amount )/100 AS 'payAmount',
|
|
|
|
+ sum( CASE WHEN flow_point != 'REFUND' THEN second_estimated_commission ELSE 0 END ) / 100 AS 'secondEstimatedCommission',
|
|
sum( CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END )/100 AS 'validPayAmount',
|
|
sum( CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END )/100 AS 'validPayAmount',
|
|
- sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )* 0.9 /100 AS
|
|
|
|
|
|
+ sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )* 0.9 /100 AS
|
|
'regimentalPromotionAmount',
|
|
'regimentalPromotionAmount',
|
|
author_bind_user_id,
|
|
author_bind_user_id,
|
|
IFNULL(author_bind_user_name,'-') AS 'userName'
|
|
IFNULL(author_bind_user_name,'-') AS 'userName'
|
|
@@ -259,7 +260,8 @@
|
|
sum(total_pay_amount)/100 AS 'orderAmount',
|
|
sum(total_pay_amount)/100 AS 'orderAmount',
|
|
IFNULL(round(SUM(CASE WHEN sample_voucher_status = 2 THEN total_pay_amount ELSE 0 END) / 100,2), 0) AS
|
|
IFNULL(round(SUM(CASE WHEN sample_voucher_status = 2 THEN total_pay_amount ELSE 0 END) / 100,2), 0) AS
|
|
'voucherOrderAmount',
|
|
'voucherOrderAmount',
|
|
- round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) AS 'regimentalPromotionAmount',
|
|
|
|
|
|
+ round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) AS
|
|
|
|
+ 'regimentalPromotionAmount',
|
|
IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN colonel_estimated_commission ELSE 0 END)/100, 0)
|
|
IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN colonel_estimated_commission ELSE 0 END)/100, 0)
|
|
AS'voucherRegimentalPromotionAmount',
|
|
AS'voucherRegimentalPromotionAmount',
|
|
sum(colonel_real_commission)/100 AS 'totalRegimentalSettleAmount',
|
|
sum(colonel_real_commission)/100 AS 'totalRegimentalSettleAmount',
|
|
@@ -399,7 +401,10 @@
|
|
sum(case when t1.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNUm',
|
|
sum(case when t1.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNUm',
|
|
CONCAT(round(sum(case when t1.flow_point != 'REFUND' then 1 else 0 end) / count(t1.order_id)*100, 2),'%') as
|
|
CONCAT(round(sum(case when t1.flow_point != 'REFUND' then 1 else 0 end) / count(t1.order_id)*100, 2),'%') as
|
|
'validRadio',
|
|
'validRadio',
|
|
- CONCAT(Round(t1.commission_rate/100,2),'%') AS 'itemCommissionRate'
|
|
|
|
|
|
+ CONCAT(Round(t1.commission_rate/100,2),'%') AS 'itemCommissionRate',
|
|
|
|
+ sum( CASE WHEN flow_point != 'REFUND' THEN second_estimated_commission ELSE 0 END ) / 100 AS 'secondEstimatedCommission',
|
|
|
|
+ sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )* 0.9 /100 AS
|
|
|
|
+ 'regimentalPromotionAmount'
|
|
FROM bytedance_promoter_order_list t1
|
|
FROM bytedance_promoter_order_list t1
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
<if test="start != null and start != ''">
|
|
<if test="start != null and start != ''">
|
|
@@ -591,7 +596,8 @@
|
|
from (select
|
|
from (select
|
|
count(t2.order_id) as 'orderNum',
|
|
count(t2.order_id) as 'orderNum',
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
- concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
|
|
|
+ concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as
|
|
|
|
+ 'validOrderRate',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
@@ -624,8 +630,9 @@
|
|
t1.promoter_name as 'promoterName',
|
|
t1.promoter_name as 'promoterName',
|
|
t1.promoter_url as 'promoterUrl',
|
|
t1.promoter_url as 'promoterUrl',
|
|
count(t2.order_id) as 'orderNum',
|
|
count(t2.order_id) as 'orderNum',
|
|
- sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
|
|
- concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
|
|
|
+ sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
|
|
+ concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as
|
|
|
|
+ 'validOrderRate',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
|
|
round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
@@ -760,8 +767,6 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<select id="bdReportList" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="bdReportList" resultType="com.alibaba.fastjson.JSONObject">
|
|
select t.*,
|
|
select t.*,
|
|
tt.promoterCount,
|
|
tt.promoterCount,
|
|
@@ -777,9 +782,11 @@
|
|
t1.user_name as 'collectSampleName',
|
|
t1.user_name as 'collectSampleName',
|
|
count(t2.order_id) as 'orderNum',
|
|
count(t2.order_id) as 'orderNum',
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNum',
|
|
- concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
|
|
|
+ concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as
|
|
|
|
+ 'validOrderRate',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
- round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) as 'regimentalPromotionAmount',
|
|
|
|
|
|
+ round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2
|
|
|
|
+ ) as 'regimentalPromotionAmount',
|
|
round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
from promoter_bind_channel_date t1
|
|
from promoter_bind_channel_date t1
|
|
left join bytedance_promoter_order_list t2
|
|
left join bytedance_promoter_order_list t2
|
|
@@ -836,14 +843,16 @@
|
|
tttt.sendPromoterCount,
|
|
tttt.sendPromoterCount,
|
|
tttt.sendItemCount,
|
|
tttt.sendItemCount,
|
|
IFNULL(ttttt.promoters_count, '-') as 'promotersCount'
|
|
IFNULL(ttttt.promoters_count, '-') as 'promotersCount'
|
|
- from (select t1.user_id as 'collectSampleId',
|
|
|
|
- t1.user_name as 'collectSampleName',
|
|
|
|
- count(t2.order_id) as 'orderNum',
|
|
|
|
- sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNum',
|
|
|
|
- concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as 'validOrderRate',
|
|
|
|
- round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
|
|
- round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2 ) as 'regimentalPromotionAmount',
|
|
|
|
- round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
|
|
|
|
+ from (select t1.user_id as 'collectSampleId',
|
|
|
|
+ t1.user_name as 'collectSampleName',
|
|
|
|
+ count(t2.order_id) as 'orderNum',
|
|
|
|
+ sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNum',
|
|
|
|
+ concat(round(sum(case when t2.flow_point != 'REFUND' then 1 else 0 end) / count(t2.order_id) * 100, 2), '%') as
|
|
|
|
+ 'validOrderRate',
|
|
|
|
+ round(sum(t2.total_pay_amount) / 100, 2) as 'orderAmount',
|
|
|
|
+ round( sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 / 100, 2
|
|
|
|
+ ) as 'regimentalPromotionAmount',
|
|
|
|
+ round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
|
|
from kuaishou_promoter t1
|
|
from kuaishou_promoter t1
|
|
left join(select *
|
|
left join(select *
|
|
from bytedance_promoter_order_list
|
|
from bytedance_promoter_order_list
|