Ver código fonte

激励添加导出,达人添加排序

zhaoxian 2 anos atrás
pai
commit
0433ac07c8

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

@@ -642,6 +642,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                     obj.put("orderAmount", 0);
                     obj.put("totalRegimentalSettleAmount", 0);
                     obj.put("promoterCount", 0);
+                    obj.put("orderCount", 0);
                     list.add(obj);
                 }
             }

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

@@ -1131,6 +1131,7 @@
     <select id="getMonthOrderAmount" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
+        IFNULL(SUM(CASE WHEN order_status != 80 THEN 1 ELSE 0 END), 0) AS 'orderCount',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
         IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
         IFNULL(promoterCount,0) AS 'promoterCount'
@@ -1164,9 +1165,9 @@
     <select id="getMonthOrderAmountByItems" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
+        IFNULL(SUM(CASE WHEN order_status != 80 THEN 1 ELSE 0 END), 0) AS 'orderCount',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
-        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
-        count(oid) AS 'orderCount'
+        IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount'
         FROM kuaishou_supply_chain
         WHERE order_status != 80
         <if test='itemIds != null and itemIds.size() > 0'>