yumeng 7 달 전
부모
커밋
aaefa1c26b

+ 7 - 6
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouItemCollectSamplesController.java

@@ -786,7 +786,8 @@ public class KuaishouItemCollectSamplesController extends BaseController {
                                  @ApiParam("类型,1-渠道;2-招商") @RequestParam(value = "type", required = true) String type,
                                  @ApiParam("媒体,1-抖音;2-快手") @RequestParam(value = "mediaId", required = false) String mediaId,
                                  @ApiParam("开始日期") @RequestParam(value = "statDate", required = false) String statDate,
-                                 @ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate
+                                 @ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
+                                 @ApiParam("结束日期") @RequestParam(value = "hourType", required = false) Integer hourType
     ) {
         JSONObject returnJson = new JSONObject();
         try {
@@ -807,9 +808,9 @@ public class KuaishouItemCollectSamplesController extends BaseController {
             }
 
             if ("2".equals(mediaId)) {
-                return kuaishouItemCollectSamplesService.getKsGmvHour(userId, type, mediaId, nowDate, lastDate);
+                return kuaishouItemCollectSamplesService.getKsGmvHour(userId, type, mediaId, nowDate, lastDate, hourType);
             } else if ("1".equals(mediaId)) {
-                return kuaishouItemCollectSamplesService.getBytedanceGmvHour(userId, type, mediaId, nowDate, lastDate);
+                return kuaishouItemCollectSamplesService.getBytedanceGmvHour(userId, type, mediaId, nowDate, lastDate, hourType);
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -916,9 +917,9 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     @ApiOperation(value = "激励列表导出")
     public void exportProductList(HttpServletResponse response, @RequestBody Map<String, Object> map) throws IOException {
 
-        if(!Check.isNull(map.get("startDate"))){
-        map.put("startDate", DateUtils.strDateToInt(String.valueOf(map.get("startDate"))));
-        map.put("endDate", DateUtils.strDateToInt(String.valueOf(map.get("endDate"))));
+        if (!Check.isNull(map.get("startDate"))) {
+            map.put("startDate", DateUtils.strDateToInt(String.valueOf(map.get("startDate"))));
+            map.put("endDate", DateUtils.strDateToInt(String.valueOf(map.get("endDate"))));
         }
         List<JSONObject> list = kuaishouItemCollectSamplesService.exportProductList(map);
         List<List<Object>> exportList = new ArrayList<>();

+ 9 - 9
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/SupplyChainMapper.java

@@ -82,7 +82,7 @@ public interface SupplyChainMapper {
 
     JSONObject selectOrderInfoBytedance(Map<String, Object> parMap);
 
-    JSONObject selectOrderRate(@Param("promoterIds") List<String> promoterIds, @Param("itemIds") List<Long> itemIds, @Param("statDate") Long statDate, @Param("endDate") Long endDate,@Param("hour") int hour);
+    JSONObject selectOrderRate(@Param("promoterIds") List<String> promoterIds, @Param("itemIds") List<Long> itemIds, @Param("statDate") Long statDate, @Param("endDate") Long endDate, @Param("hour") int hour);
 
     JSONObject selectOrderRateBytedance(@Param("promoterIds") List<String> promoterIds, @Param("itemIds") List<Long> itemIds, @Param("statDate") Long statDate, @Param("endDate") Long endDate, @Param("hour") int hour);
 
@@ -198,13 +198,13 @@ public interface SupplyChainMapper {
 
     void replaceYuxiuKuaiShouActivityOpenItemList(@Param("list") List<KuaiShouActivityOpenItemList> list);
 
-    List<JSONObject> getKsChannelGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Integer date);
+    List<JSONObject> getKsChannelGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Integer date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getKsCourtshipGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Integer date);
+    List<JSONObject> getKsCourtshipGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Integer date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getBytedanceChannelGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Long date);
+    List<JSONObject> getBytedanceChannelGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Long date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getBytedanceCourtshipGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Long date);
+    List<JSONObject> getBytedanceCourtshipGmvHourByDate(@Param("userList") List<Long> userList, @Param("date") Long date, @Param("hourType") Integer hourType);
 
     List<JSONObject> getPromoterId(@Param("promoterId") Long promoterId);
 
@@ -247,13 +247,13 @@ public interface SupplyChainMapper {
 
     List<Long> getItemIdsByDeptId(@Param("deptId") Long deptId);
 
-    List<JSONObject> getKsChannelGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Integer date);
+    List<JSONObject> getKsChannelGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Integer date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getKsCourtshipGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Integer date);
+    List<JSONObject> getKsCourtshipGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Integer date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getBytedanceChannelGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Long date);
+    List<JSONObject> getBytedanceChannelGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Long date, @Param("hourType") Integer hourType);
 
-    List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Long date);
+    List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Long date, @Param("hourType") Integer hourType);
 
     int updateYuXiuOrder(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
 

+ 4 - 3
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKuaishouItemCollectSamplesService.java

@@ -7,6 +7,7 @@ import com.ruixuan.isc.entity.KuaishouItemCollectSampleExpress;
 import com.ruixuan.isc.entity.KuaishouItemCollectSampleLog;
 import com.ruixuan.isc.entity.KuaishouItemCollectSamples;
 import io.swagger.annotations.ApiParam;
+import io.swagger.models.auth.In;
 import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
@@ -118,10 +119,10 @@ public interface IKuaishouItemCollectSamplesService {
 
     List<JSONObject> getBigDataAnalysis(String mediaId);
 
-    JSONObject getOrderHourData( String mediaId);
+    JSONObject getOrderHourData(String mediaId);
 
-    JSONObject getKsGmvHour(Long userId, String type, String mediaId,String nowDate,String lastDate);
+    JSONObject getKsGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate, Integer hourType);
 
-    JSONObject getBytedanceGmvHour(Long userId, String type, String mediaId,String nowDate,String lastDate);
+    JSONObject getBytedanceGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate, Integer hourType);
 }
 

+ 10 - 9
ruixuan-live/src/main/java/com/ruixuan/isc/service/ISupplyChainService.java

@@ -100,7 +100,7 @@ public interface ISupplyChainService {
 
     JSONObject selectOrderInfo(Map<String, Object> requestMap);
 
-    JSONObject selectOrderRate(List<String> promoterIds, List<Long> itemIds, Long statDate, Long endDate,int hour);
+    JSONObject selectOrderRate(List<String> promoterIds, List<Long> itemIds, Long statDate, Long endDate, int hour);
 
     JSONObject selectOrderRateBytedance(List<String> promoterIds, List<Long> itemIds, Long startHourTemp, Long endHourTemp, int hour);
 
@@ -194,13 +194,13 @@ public interface ISupplyChainService {
 
     List<JSONObject> exportItemDetail(Map<String, Object> requestMap);
 
-    List<JSONObject> getKsChannelGmvHourByDate(List<Long> userList, Integer nowDate);
+    List<JSONObject> getKsChannelGmvHourByDate(List<Long> userList, Integer nowDate, Integer hourType);
 
-    List<JSONObject> getKsCourtshipGmvHourByDate(List<Long> userList, Integer nowDate);
+    List<JSONObject> getKsCourtshipGmvHourByDate(List<Long> userList, Integer nowDate, Integer hourType);
 
-    List<JSONObject> getBytedanceChannelGmvHourByDate(List<Long> userList, Long nowDate);
+    List<JSONObject> getBytedanceChannelGmvHourByDate(List<Long> userList, Long nowDate, Integer hourType);
 
-    List<JSONObject> getBytedanceCourtshipGmvHourByDate(List<Long> userList, Long dataNow);
+    List<JSONObject> getBytedanceCourtshipGmvHourByDate(List<Long> userList, Long dataNow, Integer hourType);
 
 
     List<JSONObject> shopList(Map<String, Object> requestMap);
@@ -211,11 +211,12 @@ public interface ISupplyChainService {
 
     List<Long> getItemIdsByDeptId(Long deptId);
 
-    List<JSONObject> getKsChannelGmvHourByDateRoi(List<Long> userList, Integer nowDate);
+    List<JSONObject> getKsChannelGmvHourByDateRoi(List<Long> userList, Integer nowDate, Integer hourType);
 
-    List<JSONObject> getKsCourtshipGmvHourByDateRoi(List<Long> userList, Integer nowDate);
+    List<JSONObject> getKsCourtshipGmvHourByDateRoi(List<Long> userList, Integer nowDate, Integer hourType);
 
-    List<JSONObject> getBytedanceChannelGmvHourByDateRoi(List<Long> userList, Long dataNow);
+    List<JSONObject> getBytedanceChannelGmvHourByDateRoi(List<Long> userList, Long dataNow, Integer hourType);
 
-    List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(List<Long> userList, Long dataNow);
+
+    List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(List<Long> userList, Long dataNow, Integer hourType);
 }

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

@@ -824,7 +824,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
     }
 
     @Override
-    public JSONObject getKsGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate) {
+    public JSONObject getKsGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate, Integer hourType) {
         JSONObject returnJson = new JSONObject();
         String roleKey = userService.getRoleKeyByUserId(userId);
         List<Long> userList = null;
@@ -840,13 +840,13 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         List<JSONObject> yesterday = new ArrayList<>();
         List<JSONObject> roi = new ArrayList<>();
         if ("1".equals(type)) { // 渠道
-            today = supplyChainService.getKsChannelGmvHourByDate(userList, DateUtils.getIntegerTime(nowDate));
-            yesterday = supplyChainService.getKsChannelGmvHourByDate(userList, DateUtils.getIntegerTime(lastDate));
-            roi = supplyChainService.getKsChannelGmvHourByDateRoi(userList, DateUtils.getIntegerTime(nowDate));
+            today = supplyChainService.getKsChannelGmvHourByDate(userList, DateUtils.getIntegerTime(nowDate), hourType);
+            yesterday = supplyChainService.getKsChannelGmvHourByDate(userList, DateUtils.getIntegerTime(lastDate), hourType);
+            roi = supplyChainService.getKsChannelGmvHourByDateRoi(userList, DateUtils.getIntegerTime(nowDate), hourType);
         } else if ("2".equals(type)) {
-            today = supplyChainService.getKsCourtshipGmvHourByDate(userList, DateUtils.getIntegerTime(nowDate));
-            yesterday = supplyChainService.getKsCourtshipGmvHourByDate(userList, DateUtils.getIntegerTime(lastDate));
-            roi = supplyChainService.getKsCourtshipGmvHourByDateRoi(userList, DateUtils.getIntegerTime(nowDate));
+            today = supplyChainService.getKsCourtshipGmvHourByDate(userList, DateUtils.getIntegerTime(nowDate), hourType);
+            yesterday = supplyChainService.getKsCourtshipGmvHourByDate(userList, DateUtils.getIntegerTime(lastDate), hourType);
+            roi = supplyChainService.getKsCourtshipGmvHourByDateRoi(userList, DateUtils.getIntegerTime(nowDate), hourType);
         }
         completionTime(today, nowDate, "charge");
         completionTime(yesterday, lastDate, "charge");
@@ -912,7 +912,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
     }
 
     @Override
-    public JSONObject getBytedanceGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate) {
+    public JSONObject getBytedanceGmvHour(Long userId, String type, String mediaId, String nowDate, String lastDate, Integer hourType) {
         JSONObject returnJson = new JSONObject();
 
         Long dataNow = Long.valueOf(nowDate.replace("-", ""));
@@ -932,13 +932,13 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         List<JSONObject> yesterday = new ArrayList<>();
         List<JSONObject> roi = new ArrayList<>();
         if ("1".equals(type)) { // 渠道
-            today = supplyChainService.getBytedanceChannelGmvHourByDate(userList, dataNow);
-            yesterday = supplyChainService.getBytedanceChannelGmvHourByDate(userList, lastDateNow);
-            roi = supplyChainService.getBytedanceChannelGmvHourByDateRoi(userList, dataNow);
+            today = supplyChainService.getBytedanceChannelGmvHourByDate(userList, dataNow, hourType);
+            yesterday = supplyChainService.getBytedanceChannelGmvHourByDate(userList, lastDateNow, hourType);
+            roi = supplyChainService.getBytedanceChannelGmvHourByDateRoi(userList, dataNow, hourType);
         } else if ("2".equals(type)) {
-            today = supplyChainService.getBytedanceCourtshipGmvHourByDate(userList, dataNow);
-            yesterday = supplyChainService.getBytedanceCourtshipGmvHourByDate(userList, lastDateNow);
-            roi = supplyChainService.getBytedanceCourtshipGmvHourByDateRoi(userList, dataNow);
+            today = supplyChainService.getBytedanceCourtshipGmvHourByDate(userList, dataNow, hourType);
+            yesterday = supplyChainService.getBytedanceCourtshipGmvHourByDate(userList, lastDateNow, hourType);
+            roi = supplyChainService.getBytedanceCourtshipGmvHourByDateRoi(userList, dataNow, hourType);
         }
         JSONObject result = new JSONObject();
         result.put("today", today);

+ 16 - 16
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/SupplyChainServiceImpl.java

@@ -1404,23 +1404,23 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
     }
 
     @Override
-    public List<JSONObject> getKsChannelGmvHourByDate(List<Long> userList, Integer nowDate) {
-        return supplyChainMapper.getKsChannelGmvHourByDate(userList, nowDate);
+    public List<JSONObject> getKsChannelGmvHourByDate(List<Long> userList, Integer nowDate, Integer hourType) {
+        return supplyChainMapper.getKsChannelGmvHourByDate(userList, nowDate, hourType);
     }
 
     @Override
-    public List<JSONObject> getKsCourtshipGmvHourByDate(List<Long> userList, Integer nowDate) {
-        return supplyChainMapper.getKsCourtshipGmvHourByDate(userList, nowDate);
+    public List<JSONObject> getKsCourtshipGmvHourByDate(List<Long> userList, Integer nowDate, Integer hourType) {
+        return supplyChainMapper.getKsCourtshipGmvHourByDate(userList, nowDate, hourType);
     }
 
     @Override
-    public List<JSONObject> getBytedanceChannelGmvHourByDate(List<Long> userList, Long date) {
-        return supplyChainMapper.getBytedanceChannelGmvHourByDate(userList, date);
+    public List<JSONObject> getBytedanceChannelGmvHourByDate(List<Long> userList, Long date, Integer hourType) {
+        return supplyChainMapper.getBytedanceChannelGmvHourByDate(userList, date, hourType);
     }
 
     @Override
-    public List<JSONObject> getBytedanceCourtshipGmvHourByDate(List<Long> userList, Long data) {
-        return supplyChainMapper.getBytedanceCourtshipGmvHourByDate(userList, data);
+    public List<JSONObject> getBytedanceCourtshipGmvHourByDate(List<Long> userList, Long data, Integer hourType) {
+        return supplyChainMapper.getBytedanceCourtshipGmvHourByDate(userList, data, hourType);
     }
 
     @Override
@@ -1444,23 +1444,23 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
     }
 
     @Override
-    public List<JSONObject> getKsChannelGmvHourByDateRoi(List<Long> userList, Integer nowDate) {
-        return supplyChainMapper.getKsChannelGmvHourByDateRoi(userList, nowDate);
+    public List<JSONObject> getKsChannelGmvHourByDateRoi(List<Long> userList, Integer nowDate, Integer hourType) {
+        return supplyChainMapper.getKsChannelGmvHourByDateRoi(userList, nowDate, hourType);
     }
 
     @Override
-    public List<JSONObject> getKsCourtshipGmvHourByDateRoi(List<Long> userList, Integer nowDate) {
-        return supplyChainMapper.getKsCourtshipGmvHourByDateRoi(userList, nowDate);
+    public List<JSONObject> getKsCourtshipGmvHourByDateRoi(List<Long> userList, Integer nowDate, Integer hourType) {
+        return supplyChainMapper.getKsCourtshipGmvHourByDateRoi(userList, nowDate, hourType);
     }
 
     @Override
-    public List<JSONObject> getBytedanceChannelGmvHourByDateRoi(List<Long> userList, Long dataNow) {
-        return supplyChainMapper.getBytedanceChannelGmvHourByDateRoi(userList, dataNow);
+    public List<JSONObject> getBytedanceChannelGmvHourByDateRoi(List<Long> userList, Long dataNow, Integer hourType) {
+        return supplyChainMapper.getBytedanceChannelGmvHourByDateRoi(userList, dataNow, hourType);
     }
 
     @Override
-    public List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(List<Long> userList, Long dataNow) {
-        return supplyChainMapper.getBytedanceCourtshipGmvHourByDateRoi(userList, dataNow);
+    public List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(List<Long> userList, Long dataNow, Integer hourType) {
+        return supplyChainMapper.getBytedanceCourtshipGmvHourByDateRoi(userList, dataNow, hourType);
     }
 
     private void getInfoKuaishouActivityInfo(KuaishouAccessToken accessToken, String url) {

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

@@ -224,11 +224,7 @@
         else round(t3.ccr_value / 100 , 2)
         end
         ) as 'ccrInt',
-        t3.shop_star as 'shopStar',
-        t3.mall_logistics_score as 'mallLogisticsScore',
-        t3.shop_score as 'shopScore',
-        t3.mall_service_score as 'mallServiceScore',
-        t3.mall_quality_score as 'mallQualityScore',
+        t3.store_score as 'storeScore',
         (
         case when t5.is_presale = 1
         then '否'
@@ -296,14 +292,9 @@
         else '-'
         end
         ) as 'isPresale',
-        t3.shop_star as 'shopStar',
-        t3.mall_logistics_score as 'mallLogisticsScore',
-        t3.shop_score as 'shopScore',
-        t3.mall_service_score as 'mallServiceScore',
-        t3.mall_quality_score as 'mallQualityScore'
+        t3.store_score as 'storeScore',
         from (select t.item_id as 'itemId', t.item_title as 'itemTitle', t.user_id as 'userId', t.user_name as
         'userName',
-
         (case
         when tt.ccr_value is null or tt.ccr_value = 0
         then '0%'
@@ -3283,7 +3274,14 @@
     </select>
     <select id="getKsChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
         select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+
+        from kuaishou_supply_chain
         where stat_date = #{date}
         <if test='userList != null and userList.size() > 0'>
             and promoter_id in (
@@ -3307,8 +3305,16 @@
         t1.time,
         ROUND(((t1.charge-t2.charge)/t2.charge)*100,2) as 'roi'
         FROM
-        (select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
+        (
+        select stat_hour as 'time',
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+
+        from kuaishou_supply_chain
         where stat_date = #{date}
         <if test='userList != null and userList.size() > 0'>
             and promoter_id in (
@@ -3327,7 +3333,13 @@
         ) t1
         LEFT JOIN
         (select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+        from kuaishou_supply_chain
         where stat_date = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
         <if test='userList != null and userList.size() > 0'>
             and promoter_id in (
@@ -3350,7 +3362,12 @@
 
     <select id="getKsCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
         select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge'
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
         from kuaishou_supply_chain
         where stat_date = #{date}
         <if test='userList != null and userList.size() > 0'>
@@ -3377,7 +3394,12 @@
         ROUND(((t1.charge-t2.charge)/t2.charge)*100,2) as 'roi'
         FROM
         ( select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge'
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
         from kuaishou_supply_chain
         where stat_date = #{date}
         <if test='userList != null and userList.size() > 0'>
@@ -3398,7 +3420,12 @@
         LEFT JOIN
         (
         select stat_hour as 'time',
-        round(sum(pay_amount) / 100, 2) as 'charge'
+        <if test="hourType == 1 ">
+            round(sum(pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
         from kuaishou_supply_chain
         where stat_date = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
         <if test='userList != null and userList.size() > 0'>
@@ -3420,7 +3447,13 @@
     </select>
     <select id="getBytedanceChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+        from bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and author_short_id in(
             select promoter_id
@@ -3446,7 +3479,14 @@
         FROM
         (
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+
+        from bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and author_short_id in(
             select promoter_id
@@ -3465,7 +3505,13 @@
         LEFT JOIN
         (
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+        from bytedance_order_list
         where pay_success_time = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
         <if test='userList != null and userList.size() > 0'>
             and author_short_id in(
@@ -3487,7 +3533,12 @@
 
     <select id="getBytedanceCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if> from bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and product_id in(
             select item_id
@@ -3513,7 +3564,13 @@
         FROM
         (
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+        from bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and product_id in(
             select item_id
@@ -3532,7 +3589,13 @@
         LEFT JOIN
         (
         select pay_success_time_hour as 'time',
-        round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list
+        <if test="hourType == 1 ">
+            round(sum(total_pay_amount) / 100, 2) as 'charge'
+        </if>
+        <if test="hourType == 2 ">
+            count(1) as 'charge'
+        </if>
+        from bytedance_order_list
         where pay_success_time = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
         <if test='userList != null and userList.size() > 0'>
             and product_id in(