yumeng hace 1 año
padre
commit
557eddf2b6

+ 8 - 8
ruixuan-live/src/main/resources/mapper/bytedance/BytedancePromoterOrderListMapper.xml

@@ -181,7 +181,7 @@
         'validRadio',
         sum( total_pay_amount )/100 AS 'payAmount',
         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 )/100 AS
+        sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END )* 0.9 /100  AS
         'regimentalPromotionAmount',
         author_bind_user_id,
         IFNULL(author_bind_user_name,'-') AS 'userName'
@@ -259,7 +259,7 @@
         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
         'voucherOrderAmount',
-        sum(colonel_estimated_commission)/100 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)
         AS'voucherRegimentalPromotionAmount',
         sum(colonel_real_commission)/100 AS 'totalRegimentalSettleAmount',
@@ -435,7 +435,7 @@
         sum(case when t2.flow_point = 'REFUND' then 1 else 0 end) AS 'invalidOrderNUm',
         sum(case when t2.flow_point != 'REFUND' then t2.total_pay_amount else 0 end)/100 AS 'payAmount',
         sum(case when t2.flow_point != 'REFUND' then t2.colonel_estimated_commission
-        else 0 end)/100 AS 'regimentalPromotionAmount',
+        else 0 end) *0.9 /100 AS 'regimentalPromotionAmount',
         sum(case when t2.flow_point != 'REFUND' then t2.colonel_real_commission else 0 end)/100 as
         'totalRegimentalSettleAmount'
         FROM bytedance_promoter_order_list t2
@@ -474,7 +474,7 @@
         sum(case when t2.flow_point = 'REFUND' then 1 else 0 end) AS 'invalidOrderNUm',
         sum(case when t2.flow_point != 'REFUND' then t2.total_pay_amount else 0 end)/100 AS 'payAmount',
         sum(case when t2.flow_point != 'REFUND' then t2.colonel_estimated_commission
-        else 0 end)/100 AS 'regimentalPromotionAmount',
+        else 0 end) * 0.9 /100 AS 'regimentalPromotionAmount',
         sum(case when t2.flow_point != 'REFUND' then t2.colonel_real_commission else 0 end)/100 as
         'totalRegimentalSettleAmount'
         FROM kuaishou_item_list t1
@@ -661,7 +661,7 @@
         AS 'validRadio',
         sum( CASE WHEN t2.flow_point = 'REFUND' THEN 1 ELSE 0 END ) AS 'invalidOrderNUm',
         sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.total_pay_amount ELSE 0 END ) AS 'payAmount',
-        sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) AS
+        sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_estimated_commission ELSE 0 END ) * 0.9 AS
         'regimentalPromotionAmount',
         sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_real_commission ELSE 0 END ) AS
         'totalRegimentalSettleAmount'
@@ -695,7 +695,7 @@
         sum( CASE WHEN flow_point = 'REFUND' THEN 1 ELSE 0 END ) AS 'invalidOrderNUm',
         round( sum( CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END )/ 100, 2 ) AS 'payAmount',
         CONCAT(round(colonel_commission_rate/100,2),'%') AS 'regimentalPromotionRate',
-        round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END ) / 100, 2 ) AS
+        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_real_commission ELSE 0 END ) / 100, 2 ) AS
         'totalRegimentalSettleAmount',
@@ -779,7 +779,7 @@
         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.colonel_estimated_commission) / 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'
         from promoter_bind_channel_date t1
         left join bytedance_promoter_order_list t2
@@ -842,7 +842,7 @@
         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.colonel_estimated_commission) / 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'
         from kuaishou_promoter t1
         left join(select *

+ 8 - 8
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -1332,7 +1332,7 @@
         COUNT(order_id) as 'allNumber',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderNUm',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END), 0) AS 'orderAmount',
-        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END),0) AS
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
         'regimentalPromotionAmount'
         FROM bytedance_order_list
         WHERE pay_success_time >= #{startDate}
@@ -1378,7 +1378,7 @@
         COUNT(order_id) as 'allNumber',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderNUm',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END)/100, 0) AS 'orderAmount',
-        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END)/100,0) AS
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9 /100,0) AS
         'regimentalPromotionAmount'
         FROM bytedance_order_list
         WHERE pay_success_time >= #{startDate}
@@ -1472,7 +1472,7 @@
         count(1) AS 'orderCount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderCount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END),0) AS 'orderAmount',
-        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END),0) AS
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9 ,0) AS
         'regimentalPromotionAmount',
         COUNT(DISTINCT author_short_id) as 'promoterCount'
         FROM bytedance_order_list
@@ -1515,7 +1515,7 @@
         count(1) AS 'orderCount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderCount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END),0) AS 'orderAmount',
-        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END),0) AS
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
         'regimentalPromotionAmount'
         FROM bytedance_order_list
         WHERE pay_success_time >= #{startLong}
@@ -1580,7 +1580,7 @@
         (
         SELECT
         IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
-        IFNULL(SUM(colonel_estimated_commission),0) AS 'regimentalPromotionAmount'
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount'
         FROM bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='promoterIds != null and promoterIds.size() > 0'>
@@ -1595,7 +1595,7 @@
         (
         SELECT
         IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
-        IFNULL(SUM(colonel_estimated_commission),0) AS 'regimentalPromotionAmount'
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount'
         FROM bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='promoterIds != null and promoterIds.size() > 0'>
@@ -1668,7 +1668,7 @@
         (
         SELECT
         IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
-        IFNULL(SUM(colonel_estimated_commission),0) AS 'regimentalPromotionAmount',
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount',
         COUNT(order_id) as 'orderCount'
         FROM bytedance_order_list t1
         WHERE flow_point != 'REFUND'
@@ -1686,7 +1686,7 @@
         (
         SELECT
         IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
-        IFNULL(SUM(colonel_estimated_commission),0) AS 'regimentalPromotionAmount',
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount',
         COUNT(order_id) as 'orderCount'
         FROM bytedance_order_list t1
         WHERE flow_point != 'REFUND'