yumeng 1 年之前
父節點
當前提交
4d263a2e68

+ 4 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemCollectSamplesServiceImpl.java

@@ -474,6 +474,10 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         data.put("orderAmount", order.getLong("orderAmount"));//订单金额
         data.put("regimentalPromotionAmount", order.getLong("regimentalPromotionAmount"));//预估服务费
         data.put("baseAmount", order.getLong("baseAmount"));//累计货贷基数
+        if("1".equals(mediaId)){
+            data.put("secondEstimatedCommission", order.getLong("secondEstimatedCommission"));// 预估服务费支出
+
+        }
 
         Date date = new Date();
         //当前小时

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

@@ -1337,7 +1337,7 @@
         IFNULL(SUM(order_amount), 0) AS 'orderAmount',
         IFNULL(SUM(CASE WHEN order_status != 80 THEN regimental_promotion_amount ELSE 0 END),0) AS
         'regimentalPromotionAmount',
-        IFNULL(sum(base_amount), 0) as 'baseAmount'
+        IFNULL(SUM(CASE WHEN order_status != 80 THEN order_amount ELSE 0 END),0) as 'baseAmount'
         FROM kuaishou_supply_chain
         WHERE stat_date >= #{startDate}
         AND stat_date <= #{endDate}
@@ -1355,7 +1355,9 @@
         COUNT(DISTINCT author_short_id) as 'promoterCount',
         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(total_pay_amount), 0) AS 'orderAmount',
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN second_estimated_commission ELSE 0 END), 0)  AS 'secondEstimatedCommission',
+        IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END), 0) AS 'baseAmount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
         'regimentalPromotionAmount'
         FROM bytedance_order_list