浏览代码

工作台数据 bug 修复

zhaoxian 2 年之前
父节点
当前提交
f478f7daa1

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

@@ -581,7 +581,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
             Map<String, Object> map = new HashMap<>();
             map.put("start", start);
             map.put("end", end);
-            map.put("userId", userList);
+            map.put("userList", userList);
             map.put("promoterIds", promoterIds);
             map.put("startLong", DateUtils.getStartLongTime(start));
             map.put("endLong", DateUtils.getEndLongTime(end));

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

@@ -1125,13 +1125,17 @@
         SELECT
         FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
         IFNULL(promoterCount,0) AS 'promoterCount'
         FROM kuaishou_supply_chain t1
         LEFT JOIN (
         SELECT count(promoter_id) as 'promoterCount', DATE_FORMAT(create_time, '%Y-%m-%d') as 'date'
         FROM kuaishou_promoter
-        WHERE user_id = #{userId}
+        WHERE user_id in
+        <foreach collection="userList" item="item" separator=","
+                 open="(" close=")">
+            #{item}
+        </foreach>
         AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{start}
         AND DATE_FORMAT(create_time, '%Y-%m-%d') &lt;= #{end}
         GROUP BY DATE_FORMAT(create_time, '%Y-%m-%d')
@@ -1152,7 +1156,7 @@
         SELECT
         FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
         count(oid) AS 'orderCount'
         FROM kuaishou_supply_chain
         WHERE order_status != 80
@@ -1179,7 +1183,7 @@
         (
         SELECT
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount'
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount'
         FROM kuaishou_supply_chain t1
         WHERE order_status != 80
         <if test='promoterIds != null and promoterIds.size() > 0'>
@@ -1194,7 +1198,7 @@
         (
         SELECT
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount'
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount'
         FROM kuaishou_supply_chain t1
         WHERE order_status != 80
         <if test='promoterIds != null and promoterIds.size() > 0'>
@@ -1220,7 +1224,7 @@
         (
         SELECT
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
         COUNT(oid) as 'orderCount'
         FROM kuaishou_supply_chain t1
         WHERE order_status != 80
@@ -1238,7 +1242,7 @@
         (
         SELECT
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
         COUNT(oid) as 'orderCount'
         FROM kuaishou_supply_chain t1
         WHERE order_status != 80