Browse Source

kuaishou_supply_chain 时间类似更改

zhaoxian 9 months ago
parent
commit
71a951b588

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

@@ -894,8 +894,8 @@ public class KuaishouItemCollectSamplesController extends BaseController {
         map.put("reservePriceEnd", reservePriceEnd);
         map.put("validorderStart", validorderStart);
         map.put("validorderEnd", validorderEnd);
-        map.put("startDate", startDate);
-        map.put("endDate", endDate);
+        map.put("startDate", DateUtils.strDateToInt(startDate));
+        map.put("endDate", DateUtils.strDateToInt(endDate));
         JSONObject returnJson = new JSONObject();
         try {
             List<JSONObject> list = kuaishouItemCollectSamplesService.queryProductList(map);
@@ -915,6 +915,11 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     @PostMapping("/exportProductList")
     @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"))));
+        }
         List<JSONObject> list = kuaishouItemCollectSamplesService.exportProductList(map);
         List<List<Object>> exportList = new ArrayList<>();
         if (!Check.isNull(list)) {

+ 93 - 140
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -96,12 +96,10 @@ public class SupplyChainController extends BaseController {
 
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(promoterNickName)) {
             requestMap.put("promoterNickName", promoterNickName);
@@ -140,12 +138,11 @@ public class SupplyChainController extends BaseController {
             @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) String itemId) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
+
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(promoterId)) {
             requestMap.put("promoterId", promoterId);
@@ -185,12 +182,10 @@ public class SupplyChainController extends BaseController {
             @ApiParam("订单结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(promoterId)) {
             requestMap.put("promoterId", promoterId);
@@ -234,24 +229,20 @@ public class SupplyChainController extends BaseController {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate) && !Check.isNull(orderEndDate)) {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.getStartLongTime(orderStartDate);
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.getEndLongTime(orderEndDate);
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
         }
 
         if (!Check.isNull(bindStartDate) && !Check.isNull(bindEndDate)) {
             if (!Check.isNull(bindStartDate)) {
-                Long start = DateUtils.getStartLongTime(bindStartDate);
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(bindStartDate));
                 requestMap.put("bindStartDate", bindStartDate);
             }
             if (!Check.isNull(bindEndDate)) {
-                Long end = DateUtils.getEndLongTime(bindEndDate);
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(bindEndDate));
                 requestMap.put("bindEndDate", bindEndDate);
             }
         }
@@ -292,25 +283,20 @@ public class SupplyChainController extends BaseController {
     public void exportOrder(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject requestJson) throws Exception {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("orderStartDate")));
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("orderEndDate")));
         }
         if (!Check.isNull(requestJson.getString("bindStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("bindStartDate"));
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("bindStartDate")));
             requestMap.put("bindStartDate", requestJson.getString("bindStartDate"));
         }
         if (!Check.isNull(requestJson.getString("bindEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("bindEndDate"));
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("bindEndDate")));
             requestMap.put("bindEndDate", requestJson.getString("bindEndDate"));
         }
 
-
         if (!Check.isNull(requestJson.getString("promoterNickName"))) {
             requestMap.put("promoterNickName", requestJson.getString("promoterNickName"));
         }
@@ -387,12 +373,10 @@ public class SupplyChainController extends BaseController {
             @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(itemId)) {
             requestMap.put("itemId", itemId);
@@ -425,12 +409,10 @@ public class SupplyChainController extends BaseController {
     ) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(promoterId)) {
             requestMap.put("promoterId", promoterId);
@@ -464,12 +446,10 @@ public class SupplyChainController extends BaseController {
     ) throws IOException {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("orderStartDate")));
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("orderEndDate")));
         }
         if (!Check.isNull(requestJson.getLong("promoterId"))) {
             requestMap.put("promoterId", requestJson.getLong("promoterId"));
@@ -539,12 +519,10 @@ public class SupplyChainController extends BaseController {
             @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate) {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(itemId)) {
             requestMap.put("itemId", itemId);
@@ -582,48 +560,42 @@ public class SupplyChainController extends BaseController {
         JSONObject returnJson = new JSONObject();
         if (dateType == 0) {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.getStartLongTime(orderStartDate); //当天开始时间
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.getEndLongTime(orderEndDate); // 当天结束时间
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
             JSONObject orderTotal = supplyChainService.getOrderTotal(requestMap);
             returnJson.put("orderTotal", orderTotal);
             Integer hour = DateUtils.getNowHour() - 1; // 当前小时
             if (hour >= 0) {
                 JSONObject ratioJson = new JSONObject();
-                Long nowStartHourTemp = DateUtils.getStartLongTime(orderStartDate); // 当天开始时间戳
-                Long nowEndHourTemp = DateUtils.getNowEndHourTemp(orderStartDate, hour); // 当前结束时间戳
+                Long nowStartHourTemp = DateUtils.strDateToInt(orderStartDate); // 当天开始时间戳
+//                Long nowEndHourTemp = DateUtils.getNowEndHourTemp(orderStartDate, hour); // 当前结束时间戳
                 String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -1); // 昨日日期
-                Long yesterdayStartHourTemp = DateUtils.getStartLongTime(yesterday); //昨日开始时间戳
-                Long yesterdayEndHourTemp = DateUtils.getNowEndHourTemp(yesterday, hour); // 昨日结束时间戳
+                Long yesterdayStartHourTemp = DateUtils.strDateToInt(yesterday); //昨日开始时间戳
+//                Long yesterdayEndHourTemp = DateUtils.getNowEndHourTemp(yesterday, hour); // 昨日结束时间戳
 
                 Map<String, Object> ratioMap = new HashMap<>();
                 ratioMap.put("nowStartHourTemp", nowStartHourTemp);
-                ratioMap.put("nowEndHourTemp", nowEndHourTemp);
+                ratioMap.put("hour", hour);
                 ratioMap.put("yesterdayStartHourTemp", yesterdayStartHourTemp);
-                ratioMap.put("yesterdayEndHourTemp", yesterdayEndHourTemp);
                 Double ringRatio = supplyChainService.getOrderTotalRatio(ratioMap); //环比
                 ratioJson.put("ringRatio", ringRatio);
                 String yearDay = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -6); // 昨日日期
-                Long yearStartHourTemp = DateUtils.getStartLongTime(yearDay); //前7日开始时间戳
-                Long yearEndHourTemp = DateUtils.getNowEndHourTemp(yearDay, hour);//前7日结束时间戳
+                Long yearStartHourTemp = DateUtils.strDateToInt(yearDay); //前7日开始时间戳
+//                Long yearEndHourTemp = DateUtils.getNowEndHourTemp(yearDay, hour);//前7日结束时间戳
                 ratioMap.put("yesterdayStartHourTemp", yearStartHourTemp);
-                ratioMap.put("yesterdayEndHourTemp", yearEndHourTemp);
                 Double yearRatio = supplyChainService.getOrderTotalRatio(ratioMap); //同比
                 ratioJson.put("yearRatio", yearRatio);
                 returnJson.put("ratio", ratioJson);
             }
         } else {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.getStartLongTime(orderStartDate); //昨日开始时间
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.getEndLongTime(orderEndDate); // 前日开始时间
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
             JSONObject orderTotal = supplyChainService.getOrderTotal(requestMap);
             returnJson.put("orderTotal", orderTotal);
@@ -650,48 +622,39 @@ public class SupplyChainController extends BaseController {
         JSONObject returnJson = new JSONObject();
         if (dateType == 0) {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.getStartLongTime(orderStartDate); //当天开始时间
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.getEndLongTime(orderEndDate); // 当天结束时间
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
             JSONObject amountTotal = supplyChainService.getAmountTotal(requestMap);
             returnJson.put("amountTotal", amountTotal);
             Integer hour = DateUtils.getNowHour() - 1; // 当前小时
             if (hour >= 0) {
                 JSONObject amountRatioJson = new JSONObject();
-                Long nowStartHourTemp = DateUtils.getStartLongTime(orderStartDate); // 当天开始时间戳
-                Long nowEndHourTemp = DateUtils.getNowEndHourTemp(orderStartDate, hour); // 当前结束时间戳
+                Long nowStartHourTemp = DateUtils.strDateToInt(orderStartDate); // 当天开始时间
                 String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -1); // 昨日日期
-                Long yesterdayStartHourTemp = DateUtils.getStartLongTime(yesterday); //昨日开始时间戳
-                Long yesterdayEndHourTemp = DateUtils.getNowEndHourTemp(yesterday, hour); // 昨日结束时间戳
+                Long yesterdayStartHourTemp = DateUtils.strDateToInt(yesterday); //昨日开始时间
 
                 Map<String, Object> ratioMap = new HashMap<>();
                 ratioMap.put("nowStartHourTemp", nowStartHourTemp);
-                ratioMap.put("nowEndHourTemp", nowEndHourTemp);
                 ratioMap.put("yesterdayStartHourTemp", yesterdayStartHourTemp);
-                ratioMap.put("yesterdayEndHourTemp", yesterdayEndHourTemp);
+                ratioMap.put("hour", hour);
                 Double amountRingRatio = supplyChainService.getAmountTotalRatio(ratioMap); //环比
                 amountRatioJson.put("amountRingRatio", amountRingRatio);
                 String yearDay = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -6); // 昨日日期
-                Long yearStartHourTemp = DateUtils.getStartLongTime(yearDay); //前7日开始时间戳
-                Long yearEndHourTemp = DateUtils.getNowEndHourTemp(yearDay, hour);//前7日结束时间戳
+                Long yearStartHourTemp = DateUtils.strDateToInt(yearDay); //前7日开始时间
                 ratioMap.put("yesterdayStartHourTemp", yearStartHourTemp);
-                ratioMap.put("yesterdayEndHourTemp", yearEndHourTemp);
                 Double amountYearRatio = supplyChainService.getAmountTotalRatio(ratioMap); //同比
                 amountRatioJson.put("amountYearRatio", amountYearRatio);
                 returnJson.put("amountRatio", amountRatioJson);
             }
         } else {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.getStartLongTime(orderStartDate); //昨日开始时间
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.getEndLongTime(orderEndDate); // 前日开始时间
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
             JSONObject amountTotal = supplyChainService.getAmountTotal(requestMap);
             returnJson.put("amountTotal", amountTotal);
@@ -718,12 +681,10 @@ public class SupplyChainController extends BaseController {
         JSONObject returnJson = new JSONObject();
 
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate); //昨日开始时间
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate); // 前日开始时间
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         JSONObject serviceAmountTotal = supplyChainService.getServiceAmountTotal(requestMap);
         returnJson.put("serviceAmountTotal", serviceAmountTotal);
@@ -752,15 +713,12 @@ public class SupplyChainController extends BaseController {
                 return indexOrderRankBytedance(dateType, orderStartDate, orderEndDate);
             } else {
                 Integer hour = DateUtils.getNowHour(); // 当前小时
-                Long nowStartHourTemp = DateUtils.getStartLongTime(orderStartDate); // 当天开始时间戳
-                Long nowEndHourTemp = DateUtils.getNowEndHourTemp(orderStartDate, hour); // 当前结束时间戳
+                Long nowStartHourTemp = DateUtils.strDateToInt(orderStartDate); // 当天开始时间
                 String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -1); // 昨日日期
-                Long yesterdayStartHourTemp = DateUtils.getStartLongTime(yesterday); //昨日开始时间戳
-                Long yesterdayEndHourTemp = DateUtils.getNowEndHourTemp(yesterday, hour); // 昨日结束时间戳
+                Long yesterdayStartHourTemp = DateUtils.strDateToInt(yesterday); //昨日开始时间
                 requestMap.put("nowStartHourTemp", nowStartHourTemp);
-                requestMap.put("nowEndHourTemp", nowEndHourTemp);
                 requestMap.put("yesterdayStartHourTemp", yesterdayStartHourTemp);
-                requestMap.put("yesterdayEndHourTemp", yesterdayEndHourTemp);
+                requestMap.put("hour", hour);
                 startPage();
                 List<JSONObject> orderRankRatioList = supplyChainService.getOrderRankRatioList(requestMap);
                 return getDataTable(orderRankRatioList);
@@ -770,12 +728,10 @@ public class SupplyChainController extends BaseController {
                 return indexOrderRankBytedance(dateType, orderStartDate, orderEndDate);
             } else {
                 if (!Check.isNull(orderStartDate)) {
-                    Long start = DateUtils.getStartLongTime(orderStartDate);
-                    requestMap.put("start", start);
+                    requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
                 }
                 if (!Check.isNull(orderEndDate)) {
-                    Long end = DateUtils.getEndLongTime(orderEndDate);
-                    requestMap.put("end", end);
+                    requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
                 }
                 startPage();
                 List<JSONObject> orderRankRatioList = supplyChainService.getOrderRankList(requestMap);
@@ -846,15 +802,12 @@ public class SupplyChainController extends BaseController {
                     requestMap.put("end", end);
                 }
                 Integer hour = DateUtils.getNowHour(); // 当前小时
-                Long nowStartHourTemp = DateUtils.getStartLongTime(orderStartDate); // 当天开始时间戳
-                Long nowEndHourTemp = DateUtils.getNowEndHourTemp(orderStartDate, hour); // 当前结束时间戳
+                Long nowStartHourTemp = DateUtils.strDateToInt(orderStartDate); // 当天开始时间
                 String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", orderStartDate, -1); // 昨日日期
-                Long yesterdayStartHourTemp = DateUtils.getStartLongTime(yesterday); //昨日开始时间戳
-                Long yesterdayEndHourTemp = DateUtils.getNowEndHourTemp(yesterday, hour); // 昨日结束时间戳
+                Long yesterdayStartHourTemp = DateUtils.strDateToInt(yesterday); //昨日开始时间
                 requestMap.put("nowStartHourTemp", nowStartHourTemp);
-                requestMap.put("nowEndHourTemp", nowEndHourTemp);
                 requestMap.put("yesterdayStartHourTemp", yesterdayStartHourTemp);
-                requestMap.put("yesterdayEndHourTemp", yesterdayEndHourTemp);
+                requestMap.put("hour", hour);
                 startPage();
                 List<JSONObject> promoterRankRatioList = supplyChainService.getPromoterRankRatioList(requestMap);
                 return getDataTable(promoterRankRatioList);
@@ -864,12 +817,10 @@ public class SupplyChainController extends BaseController {
                 return indexPromoterRankBytedance(dateType, orderStartDate, orderEndDate, userId);
             } else {
                 if (!Check.isNull(orderStartDate)) {
-                    Long start = DateUtils.getStartLongTime(orderStartDate);
-                    requestMap.put("start", start);
+                    requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
                 }
                 if (!Check.isNull(orderEndDate)) {
-                    Long end = DateUtils.getEndLongTime(orderEndDate);
-                    requestMap.put("end", end);
+                    requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
                 }
                 startPage();
                 List<JSONObject> orderRatioList = supplyChainService.getPromoterRatioList(requestMap);
@@ -904,12 +855,10 @@ public class SupplyChainController extends BaseController {
 
         } else {
             if (!Check.isNull(orderStartDate)) {
-                Long start = DateUtils.strDateToInt(orderStartDate); //当天开始时间
-                requestMap.put("start", start);
+                requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
             }
             if (!Check.isNull(orderEndDate)) {
-                Long end = DateUtils.strDateToInt(orderEndDate); // 当天结束时间
-                requestMap.put("end", end);
+                requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             }
             startPage();
             List<JSONObject> orderRatioList = supplyChainService.getPromoterRatioListBytedance(requestMap);
@@ -923,12 +872,10 @@ public class SupplyChainController extends BaseController {
 
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("orderStartDate")));
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("orderEndDate")));
         }
         if (!Check.isNull(requestJson.getString("promoterNickName"))) {
             requestMap.put("promoterNickName", requestJson.getString("promoterNickName"));
@@ -1041,12 +988,10 @@ public class SupplyChainController extends BaseController {
     public void exportPromoter(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject requestJson) throws Exception {
         Map<String, Object> requestMap = new HashMap<>();
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("orderStartDate")));
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("orderEndDate")));
         }
         if (!Check.isNull(requestJson.getString("promoterNickName"))) {
             requestMap.put("promoterNickName", requestJson.getString("promoterNickName"));
@@ -1260,20 +1205,24 @@ public class SupplyChainController extends BaseController {
         if (!Check.isNull(orderStartDate)) {
             Long start = DateUtils.getStartLongTime(orderStartDate);
             requestMap.put("start", start);
+            requestMap.put("startDate", orderStartDate);
         }
         if (!Check.isNull(orderEndDate)) {
             Long end = DateUtils.getEndLongTime(orderEndDate);
             requestMap.put("end", end);
-        }
+            requestMap.put("endDate", orderEndDate + " 23:59:59");
 
+        }
         if (!Check.isNull(bindStartDate)) {
             Long start = DateUtils.getStartLongTime(bindStartDate);
             requestMap.put("start", start);
+            requestMap.put("startDate", bindStartDate);
         }
 
         if (!Check.isNull(bindEndDate)) {
             Long end = DateUtils.getEndLongTime(bindEndDate);
             requestMap.put("end", end);
+            requestMap.put("endDate", bindEndDate + " 23:59:59");
         }
 
         if (!Check.isNull(userId)) {
@@ -1308,20 +1257,26 @@ public class SupplyChainController extends BaseController {
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
             Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
             requestMap.put("start", start);
+            requestMap.put("startDate", requestJson.getString("orderStartDate"));
+
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
             Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
             requestMap.put("end", end);
+            requestMap.put("endDate", requestJson.getString("orderEndDate")+" 23:59:59");
         }
 
         if (!Check.isNull(requestJson.getString("bindStartDate"))) {
             Long start = DateUtils.getStartLongTime(requestJson.getString("bindStartDate"));
             requestMap.put("start", start);
+            requestMap.put("startDate", requestJson.getString("bindStartDate"));
         }
 
         if (!Check.isNull(requestJson.getString("bindEndDate"))) {
             Long end = DateUtils.getEndLongTime(requestJson.getString("bindEndDate"));
             requestMap.put("end", end);
+            requestMap.put("endDate", requestJson.getString("bindEndDate")+" 23:59:59");
+
         }
 
         if (!Check.isNull(requestJson.getString("userId"))) {
@@ -1393,12 +1348,10 @@ public class SupplyChainController extends BaseController {
             requestMap.put("userId", userId);
         }
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
-            requestMap.put("start", start);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
-            requestMap.put("end", end);
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
         }
         if (!Check.isNull(itemId)) {
             requestMap.put("itemId", itemId);
@@ -1437,11 +1390,11 @@ public class SupplyChainController extends BaseController {
             requestMap.put("userId", requestJson.getLong("userId"));
         }
         if (!Check.isNull(requestJson.getString("orderStartDate"))) {
-            Long start = DateUtils.getStartLongTime(requestJson.getString("orderStartDate"));
+            Long start = DateUtils.strDateToInt(requestJson.getString("orderStartDate"));
             requestMap.put("start", start);
         }
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
-            Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
+            Long end = DateUtils.strDateToInt(requestJson.getString("orderEndDate"));
             requestMap.put("end", end);
         }
         if (!Check.isNull(requestJson.getLong("itemId"))) {
@@ -1502,11 +1455,11 @@ public class SupplyChainController extends BaseController {
             requestMap.put("userId", userId);
         }
         if (!Check.isNull(orderStartDate)) {
-            Long start = DateUtils.getStartLongTime(orderStartDate);
+            Long start = DateUtils.strDateToInt(orderStartDate);
             requestMap.put("start", start);
         }
         if (!Check.isNull(orderEndDate)) {
-            Long end = DateUtils.getEndLongTime(orderEndDate);
+            Long end = DateUtils.strDateToInt(orderEndDate);
             requestMap.put("end", end);
         }
         JSONObject returnJson = supplyChainService.userItemTotal(requestMap);
@@ -1560,19 +1513,19 @@ public class SupplyChainController extends BaseController {
             lastCycleStart = DateUtils.getAnotherDay("yyyy-MM-dd", lastCycleEnd, -differDay);
         }
         if (!Check.isNull(thisCycleStart)) {
-            Long thisCycleStartTemp = DateUtils.getStartLongTime(thisCycleStart);
+            Long thisCycleStartTemp = DateUtils.strDateToInt(thisCycleStart);
             requestMap.put("thisCycleStartTemp", thisCycleStartTemp);
         }
         if (!Check.isNull(thisCycleEnd)) {
-            Long thisCycleEndTemp = DateUtils.getEndLongTime(thisCycleEnd);
+            Long thisCycleEndTemp = DateUtils.strDateToInt(thisCycleEnd);
             requestMap.put("thisCycleEndTemp", thisCycleEndTemp);
         }
         if (!Check.isNull(lastCycleStart)) {
-            Long lastCycleStartTemp = DateUtils.getStartLongTime(lastCycleStart);
+            Long lastCycleStartTemp = DateUtils.strDateToInt(lastCycleStart);
             requestMap.put("lastCycleStartTemp", lastCycleStartTemp);
         }
         if (!Check.isNull(lastCycleEnd)) {
-            Long lastCycleEndTemp = DateUtils.getEndLongTime(lastCycleEnd);
+            Long lastCycleEndTemp = DateUtils.strDateToInt(lastCycleEnd);
             requestMap.put("lastCycleEndTemp", lastCycleEndTemp);
         }
         JSONObject timeIntervalRatioJson = supplyChainService.getTimeIntervalRatio(requestMap);
@@ -1606,11 +1559,11 @@ public class SupplyChainController extends BaseController {
             end = orderEndDate;
         }
         if (!Check.isNull(start)) {
-            Long startTemp = DateUtils.getStartLongTime(start);
+            Long startTemp = DateUtils.strDateToInt(start);
             requestMap.put("startTemp", startTemp);
         }
         if (!Check.isNull(end)) {
-            Long endTemp = DateUtils.getEndLongTime(end);
+            Long endTemp = DateUtils.strDateToInt(end);
             requestMap.put("endTemp", endTemp);
         }
         if (!Check.isNull(type)) {
@@ -2358,8 +2311,8 @@ public class SupplyChainController extends BaseController {
             }
 
 
-            requestMap.put("start", orderStartDate);
-            requestMap.put("end", orderEndDate);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             if (!Check.isNull(sellerId)) {
                 requestMap.put("sellerId", sellerId);
 
@@ -2391,10 +2344,10 @@ public class SupplyChainController extends BaseController {
 
             @ApiParam("开始时间") @RequestParam(value = "orderStartDate", required = false) String orderStartDate,
             @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate,
-            @ApiParam("结束时间") @RequestParam(value = "sellerId", required = false) Long sellerId,
-            @ApiParam("结束时间") @RequestParam(value = "userId", required = false) Long userId,
-            @ApiParam("结束时间") @RequestParam(value = "itemId", required = false) Long itemId,
-            @ApiParam("结束时间") @RequestParam(value = "itemTitle", required = false) String itemTitle
+            @ApiParam("店铺Id") @RequestParam(value = "sellerId", required = false) Long sellerId,
+            @ApiParam("用户ID") @RequestParam(value = "userId", required = false) Long userId,
+            @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) Long itemId,
+            @ApiParam("商品名") @RequestParam(value = "itemTitle", required = false) String itemTitle
 
     ) {
         TableDataInfo dataInfo = new TableDataInfo();
@@ -2420,8 +2373,8 @@ public class SupplyChainController extends BaseController {
             }
 
 
-            requestMap.put("start", orderStartDate);
-            requestMap.put("end", orderEndDate);
+            requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
+            requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
             requestMap.put("sellerId", sellerId);
             if (!Check.isNull(itemId)) {
                 requestMap.put("itemId", itemId);
@@ -2464,8 +2417,8 @@ public class SupplyChainController extends BaseController {
                 throw new Exception("请输入用户ID");
             }
             Map<String, Object> requestMap = new HashMap<>();
-            requestMap.put("start", requestJson.getString("orderStartDate"));
-            requestMap.put("end", requestJson.getString("orderEndDate"));
+            requestMap.put("start", DateUtils.strDateToInt(requestJson.getString("orderStartDate")));
+            requestMap.put("end", DateUtils.strDateToInt(requestJson.getString("orderEndDate")));
             requestMap.put("sellerId", requestJson.getLong("sellerId"));
 
             String roleKey = sysUserService.getRoleKeyByUserId(userId);

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KuaishouItemCollectSamplesMapper.java

@@ -126,6 +126,6 @@ public interface KuaishouItemCollectSamplesMapper {
 
     List<JSONObject> getBytedanceBigDataAnalysis(@Param("startDate") Long startDate, @Param("endDate") Long endDate);
 
-    List<JSONObject> getKuaishouBigDataAnalysis(@Param("startDate") String startDate, @Param("endDate") String endDate);
+    List<JSONObject> getKuaishouBigDataAnalysis(@Param("startDate") Long startDate, @Param("endDate") Long endDate);
 }
 

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KuaishouPromoterMapper.java

@@ -72,7 +72,7 @@ public interface KuaishouPromoterMapper {
 
     KuaishouPromoter getOneByIdAndPromoterId(@Param("userId") Long userId, @Param("promoterId") String promoterId);
 
-    JSONObject getNearlyMonthGmv(@Param("promoterId") String promoterId, @Param("start") String start, @Param("end") String end);
+    JSONObject getNearlyMonthGmv(@Param("promoterId") String promoterId, @Param("start") Long start, @Param("end") Long end);
 
     void insertKuaishouPromoterRecord(JSONObject record);
 

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

@@ -78,11 +78,11 @@ public interface SupplyChainMapper {
 
     String getCookie(Long regId);
 
-    JSONObject selectOrderInfo(@Param("promoterIds") List<String> promoterIds, @Param("startDate") String startDate, @Param("endDate") String endDate);
+    JSONObject selectOrderInfo(@Param("promoterIds") List<String> promoterIds, @Param("startDate") Long startDate, @Param("endDate") Long endDate);
 
     JSONObject selectOrderInfoBytedance(@Param("promoterIds") List<String> promoterIds, @Param("startDate") Long startDate, @Param("endDate") Long endDate);
 
-    JSONObject selectOrderRate(@Param("promoterIds") List<String> promoterIds, @Param("itemIds") List<Long> itemIds, @Param("statDate") Long statDate, @Param("endDate") Long endDate);
+    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);
 
@@ -92,7 +92,7 @@ public interface SupplyChainMapper {
 
     JSONObject getMonthOrderAmountTotal(Map<String, Object> map);
 
-    JSONObject selectOrderInfoByItemIds(@Param("itemIds") List<Long> itemIds, @Param("startDate") String startDate, @Param("endDate") String endDate);
+    JSONObject selectOrderInfoByItemIds(@Param("itemIds") List<Long> itemIds, @Param("startDate") Long startDate, @Param("endDate") Long endDate);
 
     JSONObject selectOrderInfoByItemIdsBytedance(@Param("itemIds") List<Long> itemIds, @Param("startDate") Long startDate, @Param("endDate") Long endDate);
 
@@ -146,8 +146,6 @@ public interface SupplyChainMapper {
 
     List<JSONObject> exportBindOrder(Map<String, Object> requestMap);
 
-    void replaceAll(@Param("list") List<KuaishouSupplyChain> list);
-
     void updateOrder(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
 
     void updateItem(@Param("itemId") Long itemId, @Param("status") Integer status);
@@ -172,7 +170,7 @@ public interface SupplyChainMapper {
 
     List<JSONObject> getBytedanceOrderHourDataList(@Param("date") Long date);
 
-    List<JSONObject> getKuaishouOrderHourDataList(@Param("date") String date);
+    List<JSONObject> getKuaishouOrderHourDataList(@Param("date") Long date);
 
     List<JSONObject> exportItemDetail(Map<String, Object> requestMap);
 

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

@@ -98,9 +98,9 @@ public interface ISupplyChainService {
     //认领列表导出
     List<JSONObject> exportUserItemDetail(Map<String, Object> requestMap);
 
-    JSONObject selectOrderInfo(List<String> promoterIds, String startDate, String endDate);
+    JSONObject selectOrderInfo(List<String> promoterIds, Long startDate, Long endDate);
 
-    JSONObject selectOrderRate(List<String> promoterIds, List<Long> itemIds, Long statDate, Long endDate);
+    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);
 
@@ -108,7 +108,7 @@ public interface ISupplyChainService {
 
     JSONObject getMonthOrderAmountTotal(Map<String, Object> map);
 
-    JSONObject selectOrderInfoByItemIds(List<Long> itemIds, String startDate, String endDate);
+    JSONObject selectOrderInfoByItemIds(List<Long> itemIds, Long startDate, Long endDate);
 
     List<JSONObject> getMonthOrderAmountByItems(Map<String, Object> map);
 
@@ -188,7 +188,7 @@ public interface ISupplyChainService {
 
     List<JSONObject> getBytedanceOrderHourDataList(Long today);
 
-    List<JSONObject> getKuaishouOrderHourDataList(String today);
+    List<JSONObject> getKuaishouOrderHourDataList(Long today);
 
     List<JSONObject> getTopOrders(Map<String, Object> requestMap);
 

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

@@ -465,7 +465,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("1".equals(mediaId)) {
             order = supplyChainService.selectOrderInfoBytedance(promoterIds, DateUtils.strDateToInt(startDate), DateUtils.strDateToInt(endDate));
         } else {
-            order = supplyChainService.selectOrderInfo(promoterIds, startDate, endDate);
+            order = supplyChainService.selectOrderInfo(promoterIds, DateUtils.strDateToInt(startDate), DateUtils.strDateToInt(endDate));
         }
         data.put("allNumber", order.getLong("allNumber"));//订单总数
         data.put("promoterCount", order.getLong("promoterCount"));//达人总数
@@ -550,9 +550,9 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
             Long endHourTemp = DateUtils.strDateToInt(endDate);
             return supplyChainService.selectOrderRateBytedance(promoterIds, itemIds, startHourTemp, endHourTemp, hour);
         } else if ("2".equals(mediaId)) {
-            Long startHourTemp = DateUtils.getStartLongTime(startDate); // startDate开始时间戳
-            Long endHourTemp = DateUtils.getNowEndHourTemp(endDate, hour); // endDate结束时间戳
-            return supplyChainService.selectOrderRate(promoterIds, itemIds, startHourTemp, endHourTemp);
+            Long startHourTemp = DateUtils.strDateToInt(startDate); // startDate开始时间
+            Long endHourTemp = DateUtils.strDateToInt(endDate); // endDate结束时间
+            return supplyChainService.selectOrderRate(promoterIds, itemIds, startHourTemp, endHourTemp, hour);
         }
         return null;
     }
@@ -587,7 +587,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                 Long endHourTemp = DateUtils.strDateToInt(endDate);
                 order = supplyChainService.selectOrderInfoByItemIdsBytedance(itemIds, startHourTemp, endHourTemp);
             } else {
-                order = supplyChainService.selectOrderInfoByItemIds(itemIds, startDate, endDate);
+                order = supplyChainService.selectOrderInfoByItemIds(itemIds, DateUtils.strDateToInt(startDate), DateUtils.strDateToInt(endDate));
             }
             data.put("sendCount", order.getLong("sendCount"));//发货数
             data.put("sendRate", order.getString("sendRate"));//订单发货率
@@ -737,7 +737,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("1".equals(mediaId)) {
             return kuaishouItemCollectSamplesMapper.getBytedanceBigDataAnalysis(Long.valueOf(startDate.replace("-", "")), Long.valueOf(endDate.replace("-", "")));
         } else if ("2".equals(mediaId)) {
-            return kuaishouItemCollectSamplesMapper.getKuaishouBigDataAnalysis(startDate, endDate);
+            return kuaishouItemCollectSamplesMapper.getKuaishouBigDataAnalysis(DateUtils.strDateToInt(startDate), DateUtils.strDateToInt(endDate));
 
         }
 
@@ -769,8 +769,8 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
             obj.put("todayList", list);
             obj.put("yesterdayList", ylist);
         } else {
-            List<JSONObject> list = supplyChainService.getKuaishouOrderHourDataList(today);
-            List<JSONObject> ylist = supplyChainService.getKuaishouOrderHourDataList(yesterday);
+            List<JSONObject> list = supplyChainService.getKuaishouOrderHourDataList(DateUtils.strDateToInt(today));
+            List<JSONObject> ylist = supplyChainService.getKuaishouOrderHourDataList(DateUtils.strDateToInt(yesterday));
             obj.put("todayList", list);
             obj.put("yesterdayList", ylist);
         }
@@ -923,13 +923,9 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         map.put("end", endDate);
         map.put("userList", userList);
         map.put("promoterIds", promoterIds);
-        if ("1".equals(mediaId)) {
-            map.put("startLong", Long.valueOf(startDate.replace("-", "")));
-            map.put("endLong", Long.valueOf(endDate.replace("-", "")));
-        } else {
-            map.put("startLong", DateUtils.getStartLongTime(startDate));
-            map.put("endLong", DateUtils.getEndLongTime(endDate));
-        }
+//        map.put("toStartLong", DateUtils.getStartLongTime(endDate));
+        map.put("startLong", DateUtils.strDateToInt(startDate));
+        map.put("endLong", DateUtils.strDateToInt(endDate));
         List<JSONObject> list = null;
         if ("1".equals(mediaId)) {
             list = supplyChainService.getMonthOrderAmountBytedance(map);
@@ -963,7 +959,6 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
             }
         });
         data.put("list", list);
-        map.put("toStartLong", DateUtils.getStartLongTime(endDate));
         JSONObject amount = null;
         if ("1".equals(mediaId)) {
             amount = supplyChainService.getMonthOrderAmountTotalBytedance(map);

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

@@ -1081,7 +1081,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
 
                 String start = DateUtils.getSubtractTime(new Date(), 31);
                 String end = DateUtils.getDate();
-                JSONObject info = kuaishouPromoterMapper.getNearlyMonthGmv(promoter.getPromoterId(), start, end);
+                JSONObject info = kuaishouPromoterMapper.getNearlyMonthGmv(promoter.getPromoterId(), DateUtils.strDateToInt(start), DateUtils.strDateToInt(end));
 
                 if (Check.isNotNull(info)) {
                     data.put("orderAmount", info.getString("orderAmount"));

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

@@ -229,13 +229,13 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
     }
 
     @Override
-    public JSONObject selectOrderInfo(List<String> promoterIds, String startDate, String endDate) {
+    public JSONObject selectOrderInfo(List<String> promoterIds, Long startDate, Long endDate) {
         return supplyChainMapper.selectOrderInfo(promoterIds, startDate, endDate);
     }
 
     @Override
-    public JSONObject selectOrderRate(List<String> promoterIds, List<Long> itemIds, Long statDate, Long endDate) {
-        return supplyChainMapper.selectOrderRate(promoterIds, itemIds, statDate, endDate);
+    public JSONObject selectOrderRate(List<String> promoterIds, List<Long> itemIds, Long statDate, Long endDate, int hour) {
+        return supplyChainMapper.selectOrderRate(promoterIds, itemIds, statDate, endDate, hour);
     }
 
     @Override
@@ -309,7 +309,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
     }
 
     @Override
-    public JSONObject selectOrderInfoByItemIds(List<Long> itemIds, String startDate, String endDate) {
+    public JSONObject selectOrderInfoByItemIds(List<Long> itemIds, Long startDate, Long endDate) {
         return supplyChainMapper.selectOrderInfoByItemIds(itemIds, startDate, endDate);
     }
 
@@ -1152,7 +1152,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
     }
 
     @Override
-    public List<JSONObject> getKuaishouOrderHourDataList(String date) {
+    public List<JSONObject> getKuaishouOrderHourDataList(Long date) {
         return supplyChainMapper.getKuaishouOrderHourDataList(date);
     }
 

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

@@ -945,8 +945,8 @@
                                                           '%') as 'operationCompletionRate'
         FROM kuaishou_supply_chain
         WHERE promoter_id = #{promoterId}
-          AND FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') >= #{start}
-          AND FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') &lt;= #{end}
+          AND stat_date >= #{start}
+          AND stat_date &lt;= #{end}
     </select>
 
 

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

@@ -56,10 +56,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}
@@ -84,10 +84,10 @@
         from kuaishou_supply_chain
         where promoter_id = #{promoterId}
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         group by item_id) t
         order by t.orderNum desc limit 3
@@ -129,10 +129,10 @@
         </if>
 
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="itemId != null and itemId != ''">
             and item_id = #{itemId}
@@ -149,24 +149,24 @@
         order by t.orderNum desc
     </select>
     <select id="orderStatistics" resultType="com.alibaba.fastjson.JSONObject">
-        select FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d') as 'date',
+        select stat_date as 'date',
         count(t.oid) as 'orderNum'
         from (select oid,
-        order_create_time
+        stat_date
         from kuaishou_supply_chain
         where 1 = 1
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}
         </if>
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         ) t
-        group by FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d')
-        order by FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d') asc
+        group by stat_date
+        order by stat_date asc
     </select>
     <select id="itemList" resultType="com.alibaba.fastjson.JSONObject">
         select *
@@ -219,10 +219,10 @@
         on t1.item_id = t5.item_id
         where 1 = 1
         <if test="start != null and start != ''">
-            and t1.order_create_time &gt;= #{start}
+            and t1.stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and t1.order_create_time &lt;= #{end}
+            and t1.stat_date &lt;= #{end}
         </if>
         <if test="itemId != null and itemId != ''">
             and t1.item_id = #{itemId}
@@ -294,7 +294,7 @@
         4) as 'deliveryRadio',
         item_commission_rate as 'itemCommissionRate'
         from kuaishou_supply_chain
-        where order_create_time &gt;= #{start}
+        where stat_date &gt;= #{start}
         group by item_id) t2 on t1.itemId = t2.itemId
         left join kuaishou_activity_open_item_list t3
         on t1.itemId = t3.item_id
@@ -326,10 +326,10 @@
         from kuaishou_supply_chain
         where item_id = #{itemId}
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         group by promoter_id) t
         order by t.orderNum desc limit 3
@@ -359,10 +359,10 @@
             and item_id = #{itemId}
         </if>
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}
@@ -407,10 +407,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="itemId != null and itemId != ''">
             and item_id = #{itemId}
@@ -429,10 +429,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
 
     </select>
@@ -443,20 +443,20 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
-            and order_create_time &gt;= #{nowStartHourTemp}
+            and stat_date = #{nowStartHourTemp}
         </if>
-        <if test="nowEndHourTemp != null and nowEndHourTemp != ''">
-            and order_create_time &lt;= #{nowEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         ) t1
         join (select count(oid) as 'oid'
         from kuaishou_supply_chain
         where 1=1
         <if test="yesterdayStartHourTemp != null and yesterdayStartHourTemp != ''">
-            and order_create_time &gt;= #{yesterdayStartHourTemp}
+            and stat_date = #{yesterdayStartHourTemp}
         </if>
-        <if test="yesterdayEndHourTemp != null and yesterdayEndHourTemp != ''">
-            and order_create_time &lt;= #{yesterdayEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         ) t2
 
@@ -471,10 +471,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
 
     </select>
@@ -485,20 +485,20 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
-            and order_create_time &gt;= #{nowStartHourTemp}
+            and stat_date = #{nowStartHourTemp}
         </if>
-        <if test="nowEndHourTemp != null and nowEndHourTemp != ''">
-            and order_create_time &lt;= #{nowEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         ) t1
         join (select sum(pay_amount) as 'payAmount'
         from kuaishou_supply_chain
         where 1=1
         <if test="yesterdayStartHourTemp != null and yesterdayStartHourTemp != ''">
-            and order_create_time &gt;= #{yesterdayStartHourTemp}
+            and stat_date = #{yesterdayStartHourTemp}
         </if>
-        <if test="yesterdayEndHourTemp != null and yesterdayEndHourTemp != ''">
-            and order_create_time &lt;= #{yesterdayEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         ) t2
     </select>
@@ -512,10 +512,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
     </select>
     <select id="getOrderRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
@@ -536,10 +536,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
-            and order_create_time &gt;= #{nowStartHourTemp}
+            and stat_date = #{nowStartHourTemp}
         </if>
-        <if test="nowEndHourTemp != null and nowEndHourTemp != ''">
-            and order_create_time &lt;= #{nowEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         group by item_id
         ) t1
@@ -549,10 +549,10 @@
         from kuaishou_supply_chain
         where 1=1
         <if test="yesterdayStartHourTemp != null and yesterdayStartHourTemp != ''">
-            and order_create_time &gt;= #{yesterdayStartHourTemp}
+            and stat_date = #{yesterdayStartHourTemp}
         </if>
-        <if test="yesterdayEndHourTemp != null and yesterdayEndHourTemp != ''">
-            and order_create_time &lt;= #{yesterdayEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         group by item_id
         ) t2 on t1.itemId = t2.itemId
@@ -619,10 +619,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         group by item_id) t
         order by t.orderNum desc
@@ -672,10 +672,10 @@
             </foreach>
         </if>
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
-            and order_create_time &gt;= #{nowStartHourTemp}
+            and stat_date = #{nowStartHourTemp}
         </if>
-        <if test="nowEndHourTemp != null and nowEndHourTemp != ''">
-            and order_create_time &lt;= #{nowEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         group by t.promoter_id
         ) t1
@@ -692,10 +692,10 @@
             </foreach>
         </if>
         <if test="yesterdayStartHourTemp != null and yesterdayStartHourTemp != ''">
-            and order_create_time &gt;= #{yesterdayStartHourTemp}
+            and stat_date = #{yesterdayStartHourTemp}
         </if>
-        <if test="yesterdayEndHourTemp != null and yesterdayEndHourTemp != ''">
-            and order_create_time &lt;= #{yesterdayEndHourTemp}
+        <if test="hour != null and hour != ''">
+            and `stat_hour` &lt;= #{hour}
         </if>
         group by promoter_id
         ) t2 on t1.promoterId = t2.promoterId
@@ -773,10 +773,10 @@
         left join kuaishou_promoter tt on t1.promoter_id = tt.promoter_id
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         group by t1.promoter_id) t
         order by t.orderNum desc
@@ -822,10 +822,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}
@@ -863,10 +863,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}
@@ -925,10 +925,10 @@
         on t1.item_id = t5.item_id
         where 1 = 1
         <if test="start != null and start != ''">
-            and t1.order_create_time &gt;= #{start}
+            and t1.stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and t1.order_create_time &lt;= #{end}
+            and t1.stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and t1.promoter_id = #{promoterId}
@@ -986,7 +986,10 @@
     </select>
     <select id="getSupplyChainUserList" resultType="com.alibaba.fastjson.JSONObject">
         SELECT *
-        FROM (SELECT t3.user_id AS 'userId', t3.nick_name AS 'nickMame', t1.role_name AS 'roleName', t3.status,
+        FROM (SELECT t3.user_id AS 'userId',
+                     t3.nick_name AS 'nickMame',
+                     t1.role_name AS 'roleName',
+                     t3.status,
                      t3.create_time
               FROM sys_role t1
                        LEFT JOIN sys_user_role t2 ON t1.role_id = t2.role_id
@@ -1037,17 +1040,16 @@
         on t1.item_id = t2.item_id
         where 1= 1
         <if test="start != null and start != ''">
-            and t2.order_create_time &gt;= #{start}
+            and t2.stat_date &gt;= DATE_FORMAT(#{startDate},'%Y%m%d')
         </if>
         <if test="end != null and end != ''">
-            and t2.order_create_time &lt;= #{end}
+            and t2.stat_date &lt;= DATE_FORMAT(#{endDate},'%Y%m%d')
         </if>
         group by t1.user_id) t left join (
         select item_create_id,count(1) as 'sendSampleCount' from kuaishou_item_collect_samples
-        where courier_number_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and courier_number_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
+        where courier_number_time >= #{startDate}
+        and courier_number_time &lt;= #{endDate}
         group by item_create_id
-
         ) t1 on t.userId = t1.item_create_id
         where 1 =1
         <if test="userId != null and userId != ''">
@@ -1155,10 +1157,10 @@
         WHERE
         1 = 1
         <if test="start != null and start != ''">
-            and t2.order_create_time &gt;= #{start}
+            and t2.stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and t2.order_create_time &lt;= #{end}
+            and t2.stat_date &lt;= #{end}
         </if>
         <if test="itemId != null and itemId != ''">
             and t1.item_id = #{itemId}
@@ -1185,10 +1187,10 @@
         from kuaishou_supply_chain
         where 1= 1
         <if test="thisCycleStartTemp != null and thisCycleStartTemp != ''">
-            and order_create_time &gt;= #{thisCycleStartTemp}
+            and stat_date &gt;= #{thisCycleStartTemp}
         </if>
         <if test="thisCycleEndTemp != null and thisCycleEndTemp != ''">
-            and order_create_time &lt;= #{thisCycleEndTemp}
+            and stat_date &lt;= #{thisCycleEndTemp}
         </if>
         ) t1
         join (
@@ -1197,16 +1199,16 @@
         from kuaishou_supply_chain
         where 1=1
         <if test="lastCycleStartTemp != null and lastCycleStartTemp != ''">
-            and order_create_time &gt;= #{lastCycleStartTemp}
+            and stat_date &gt;= #{lastCycleStartTemp}
         </if>
         <if test="lastCycleStartTemp != null and lastCycleStartTemp != ''">
-            and order_create_time &lt;= #{lastCycleEndTemp}
+            and stat_date &lt;= #{lastCycleEndTemp}
         </if>
         ) t2
 
     </select>
     <select id="indexStatistics" resultType="com.alibaba.fastjson.JSONObject">
-        select FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d') as 'date',
+        select stat_date as 'date',
         <if test="type == 'orderNum' ">
             count(t.oid) as 'orderNum'
         </if>
@@ -1228,18 +1230,18 @@
         order_amount,
         base_amount,
         send_status,
-        order_create_time
+        stat_date
         from kuaishou_supply_chain
         where 1 = 1
         <if test="startTemp != null and startTemp != ''">
-            and order_create_time &gt;= #{startTemp}
+            and stat_date &gt;= #{startTemp}
         </if>
         <if test="endTemp != null and endTemp != ''">
-            and order_create_time &lt;= #{endTemp}
+            and stat_date &lt;= #{endTemp}
         </if>
         ) t
-        group by FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d')
-        order by FROM_UNIXTIME(t.order_create_time / 1000, '%y-%m-%d') asc
+        group by stat_date
+        order by stat_date asc
     </select>
     <select id="itemBindSummary" resultType="com.alibaba.fastjson.JSONObject">
         SELECT COUNT(t1.item_id) AS 'itemTotal', SUM(CASE WHEN t2.item_id IS NOT NULL THEN 1 ELSE 0 END) AS 'claimCount', SUM(CASE WHEN t2.item_id IS NULL THEN 1 ELSE 0 END) AS 'unClaimCount'
@@ -1325,10 +1327,10 @@
         kuaishou_supply_chain t2 ON t1.item_id = t2.item_id
         WHERE 1 = 1
         <if test="start != null and start != ''">
-            and t2.order_create_time &gt;= #{start}
+            and t2.stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and t2.order_create_time &lt;= #{end}
+            and t2.stat_date &lt;= #{end}
         </if>
         <if test="userId != null and userId != ''">
             and t1.user_id = #{userId}
@@ -1419,10 +1421,10 @@
         WHERE
         1 = 1
         <if test="start != null and start != ''">
-            and t2.order_create_time &gt;= #{start}
+            and t2.stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and t2.order_create_time &lt;= #{end}
+            and t2.stat_date &lt;= #{end}
         </if>
         <if test="itemId != null and itemId != ''">
             and t1.item_id = #{itemId}
@@ -1551,8 +1553,9 @@
         count(oid) as 'allNumber',
         IFNULL(sum(order_amount),0) AS 'orderAmount'
         FROM kuaishou_supply_chain
-        WHERE order_create_time >= #{statDate}
-        AND order_create_time &lt;= #{endDate}
+        WHERE stat_date >= #{statDate}
+        AND stat_date &lt;= #{endDate}
+        AND stat_hour &lt;=#{hour}
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND promoter_id in
             <foreach collection="promoterIds" item="item" separator=","
@@ -1606,8 +1609,8 @@
         t2.valid_gmv_rate as 'validGmvRate'
         from (
         SELECT
-        FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
-        FROM_UNIXTIME(order_create_time / 1000, '%Y%m%d') as 'dateInt',
+        stat_date as 'date',
+        DATE_FORMAT(stat_date, '%Y%m%d') as 'dateInt',
         count(1) AS 'orderCount',
         IFNULL(SUM(CASE WHEN order_status != 80 THEN 1 ELSE 0 END), 0) AS 'validOrderCount',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
@@ -1620,15 +1623,15 @@
         'regimentalPromotionAmount',
         COUNT(DISTINCT promoter_id) as 'promoterCount'
         FROM kuaishou_supply_chain t1
-        WHERE order_create_time >= #{startLong}
-        AND order_create_time &lt;= #{endLong}
+        WHERE stat_date >= #{startLong}
+        AND stat_date &lt;= #{endLong}
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND promoter_id in
             <foreach collection="promoterIds" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
         </if>
-        GROUP BY FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d')) t left join valid_order_gmv_rate t2
+        GROUP BY stat_date) t left join valid_order_gmv_rate t2
         on t.dateInt = t2.stat_date
 
     </select>
@@ -1670,8 +1673,8 @@
         t2.valid_gmv_rate as 'validGmvRate'
         from (
         SELECT
-        FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
-        FROM_UNIXTIME(order_create_time / 1000, '%Y%m%d') as 'dateInt',
+        stat_date as 'date',
+        DATE_FORMAT(stat_date, '%Y%m%d') as 'dateInt',
         count(1) AS 'orderCount',
         IFNULL(SUM(CASE WHEN order_status != 80 THEN 1 ELSE 0 END), 0) AS 'validOrderCount',
         IFNULL(SUM(order_amount),0) AS 'orderAmount',
@@ -1683,8 +1686,8 @@
         IFNULL(SUM(CASE WHEN order_status != 80 THEN regimental_promotion_amount ELSE 0 END),0) AS
         'regimentalPromotionAmount'
         FROM kuaishou_supply_chain
-        WHERE order_create_time >= #{startLong}
-        AND order_create_time &lt;= #{endLong}
+        WHERE stat_date >= #{IntStart}
+        AND stat_date &lt;= #{IntEnd}
         <if test='itemIds != null and itemIds.size() > 0'>
             AND item_id in
             <foreach collection="itemIds" item="item" separator=","
@@ -1692,7 +1695,7 @@
                 #{item}
             </foreach>
         </if>
-        GROUP BY FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d')) t left join valid_order_gmv_rate t2
+        GROUP BY stat_date) t left join valid_order_gmv_rate t2
         on t.dateInt = t2.stat_date
     </select>
 
@@ -1748,8 +1751,8 @@
                 #{item}
             </foreach>
         </if>
-        AND order_create_time >= #{startLong}
-        AND order_create_time &lt;= #{endLong}) t1
+        AND stat_date >= #{startLong}
+        AND stat_date &lt;= #{endLong}) t1
         LEFT JOIN
         (
         SELECT
@@ -1763,8 +1766,7 @@
                 #{item}
             </foreach>
         </if>
-        AND order_create_time >= #{toStartLong}
-        AND order_create_time &lt;= #{endLong})t2 ON 1=1
+        AND stat_date >= #{endLong})t2 ON 1=1
     </select>
 
     <select id="getMonthOrderAmountTotalBytedance" resultType="com.alibaba.fastjson.JSONObject">
@@ -1832,8 +1834,8 @@
                 #{item}
             </foreach>
         </if>
-        AND order_create_time >= #{startLong}
-        AND order_create_time &lt;= #{endLong}
+        AND stat_date >= #{IntStart}
+        AND stat_date &lt;= #{IntEnd}
         )t1
         LEFT JOIN
         (
@@ -1850,8 +1852,7 @@
                 #{item}
             </foreach>
         </if>
-        AND order_create_time >= #{toStartLong}
-        AND order_create_time &lt;= #{endLong}
+        AND stat_date = #{IntEnd}
         )t2 ON 1=1
     </select>
 
@@ -2259,15 +2260,15 @@
         on t1.item_id = t2.item_id
         where 1= 1
         <if test="start != null and start != ''">
-            and t2.order_create_time &gt;= #{start}
+            and t2.stat_date &gt;= DATE_FORMAT(#{startDate},'%Y%m%d')
         </if>
         <if test="end != null and end != ''">
-            and t2.order_create_time &lt;= #{end}
+            and t2.stat_date &lt;= DATE_FORMAT(#{endDate},'%Y%m%d')
         </if>
         group by t1.user_id) t left join (
         select item_create_id,count(1) as 'sendSampleCount' from kuaishou_item_collect_samples
-        where courier_number_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and courier_number_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
+        where courier_number_time >= #{startDate}
+        and courier_number_time &lt;= #{endDate}
         group by item_create_id
 
         ) t1 on t.userId = t1.item_create_id
@@ -2327,20 +2328,20 @@
         regimental_promotion_amount,
         total_regimental_settle_amount
         from kuaishou_supply_chain
-        where order_create_time &gt;= #{start}) t2
+        where stat_date &gt;= DATE_FORMAT(#{startDate},'%Y%m%d') ) t2
         on t1.item_id = t2.item_id
-        where t1.create_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and t1.create_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
+        where t1.create_time >= #{startDate}
+        and t1.create_time &lt;= #{endDate}
         <if test="userId != null and userId != ''">
-            and t1.userId = #{userId}
+            and t1.user_id = #{userId}
         </if>
         group by t1.user_id ) t left join (
         select t1.user_id,count(distinct courier_number) as 'sendSampleCount' from kuaishou_item_list t1 left join
         kuaishou_item_collect_samples t2
         on t1.item_id = t2.item_id
-        where t1.create_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and t1.create_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
-        and t2.courier_number_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
+        where t1.create_time >= #{startDate}
+        and t1.create_time &lt;= #{endDate}
+        and t2.courier_number_time >= #{startDate}
         group by t1.user_id
         ) t2 on t.userId = t2.user_id order by t.orderNum desc
     </select>
@@ -2378,10 +2379,10 @@
         regimental_promotion_amount,
         total_regimental_settle_amount
         from kuaishou_supply_chain
-        where order_create_time &gt;= #{start}) t2
+        where stat_date &gt;= DATE_FORMAT(#{startDate},'%Y%m%d') ) t2
         on t1.item_id = t2.item_id
-        where t1.create_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and t1.create_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
+        where t1.create_time >= #{startDate}
+        and t1.create_time &lt;= #{endDate}
         <if test="userId != null and userId != ''">
             and t1.userId = #{userId}
         </if>
@@ -2389,9 +2390,9 @@
         select t1.user_id,count(distinct courier_number) as 'sendSampleCount' from kuaishou_item_list t1 left join
         kuaishou_item_collect_samples t2
         on t1.item_id = t2.item_id
-        where t1.create_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
-        and t1.create_time &lt;= from_unixtime(#{end}/1000,'%Y-%m-%d %H:%i:%s')
-        and t2.courier_number_time >= from_unixtime(#{start}/1000,'%Y-%m-%d %H:%i:%s')
+        where t1.create_time >= #{startDate}
+        and t1.create_time &lt;= #{endDate}
+        and t2.courier_number_time >= #{startDate}
         group by t1.user_id
         ) t2 on t.userId = t2.user_id order by t.orderNum desc;
 
@@ -2643,7 +2644,7 @@
         != 80 then 1 else 0 end) * 100, 2) as 'deliveryRadio',
         round(item_commission_rate / 10,2) as 'itemCommissionRate'
         from kuaishou_supply_chain
-        where order_create_time &gt;= #{start}
+        where stat_date &gt;= #{start}
         group by item_id) t2 on t1.itemId = t2.itemId
         left join kuaishou_item_ccr_info t3
         on t1.itemId = t3.item_id
@@ -2665,68 +2666,6 @@
     </select>
 
 
-    <insert id="replaceAll">
-        replace into kuaishou_supply_chain(
-        oid,
-        item_id,
-        item_title,
-        reserve_price,
-        image_url,
-        order_status,
-        order_create_time,
-        send_status,
-        settlement_biz_type,
-        settlement_biz_type_desc,
-        send_time,
-        recv_time,
-        seller_id,
-        activity_id,
-        order_amount,
-        pay_amount,
-        regimental_promotion_rate,
-        share_rate,
-        base_amount,
-        service_amount,
-        regimental_promotion_amount,
-        total_regimental_settle_amount,
-        stat_date,
-        item_commission_rate,
-        promoter_id,
-        promoter_nick_name
-        )
-        values
-        <foreach collection="list" item="add" separator=",">
-            (
-            #{add.oid},
-            #{add.itemId},
-            #{add.itemTitle},
-            #{add.reservePrice},
-            #{add.imageUrl},
-            #{add.orderStatus},
-            #{add.orderCreateTime},
-            #{add.sendStatus},
-            #{add.settlementBizType},
-            #{add.settlementBizTypeDesc},
-            #{add.sendTime},
-            #{add.recvTime},
-            #{add.sellerId},
-            #{add.activityId},
-            #{add.orderAmount},
-            #{add.payAmount},
-            #{add.regimentalPromotionRate},
-            #{add.shareRate},
-            #{add.baseAmount},
-            #{add.serviceAmount},
-            #{add.regimentalPromotionAmount},
-            #{add.totalRegimentalSettleAmount},
-            #{add.statDate},
-            #{add.itemCommissionRate},
-            #{add.promoterId},
-            #{add.promoterNickName}
-            )
-        </foreach>
-    </insert>
-
     <insert id="replaceKuaishouActivityInfo">
         replace into kuaishou_activity_info(
         activity_id,
@@ -2972,10 +2911,10 @@
             and item_id = #{itemId}
         </if>
         <if test="start != null and start != ''">
-            and order_create_time &gt;= #{start}
+            and stat_date &gt;= #{start}
         </if>
         <if test="end != null and end != ''">
-            and order_create_time &lt;= #{end}
+            and stat_date &lt;= #{end}
         </if>
         <if test="promoterId != null and promoterId != ''">
             and promoter_id = #{promoterId}