Browse Source

快手小店--成本管理

yumeng 10 months ago
parent
commit
6d984c96de

+ 5 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KwaiJSTController.java

@@ -47,12 +47,16 @@ public class KwaiJSTController {
             if (Check.isNull(dataType)) {
                 throw new Exception("请输入dataType");
             }
+            Long date = requestJson.getLong("date");
+            if (Check.isNull(date)) {
+                throw new Exception("请输入date");
+            }
 
             cleanService.submit(new Runnable() {
                 @Override
                 public void run() {
                     try {
-                        kwaiJSTService.costDetail(skuNick, dataType);
+                        kwaiJSTService.costDetail(skuNick, dataType, date);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }

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

@@ -11,7 +11,7 @@ public interface IKwaiJSTService {
 
     void queryAndInsertPurchase(String dates);
 
-    JSONObject costDetail(String skuNick, Integer dataType);
+    JSONObject costDetail(String skuNick, Integer dataType,Long date);
 
     List<JSONObject> getSkuDataList(Long date);
 

+ 2 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KwaiJSTServiceImpl.java

@@ -236,7 +236,7 @@ public class KwaiJSTServiceImpl implements IKwaiJSTService {
     }
 
     @Override
-    public JSONObject costDetail(String skuNick, Integer dataType) {
+    public JSONObject costDetail(String skuNick, Integer dataType,Long date) {
         JSONObject returnJSon = new JSONObject();
 
         try {
@@ -253,7 +253,7 @@ public class KwaiJSTServiceImpl implements IKwaiJSTService {
                 return returnJSon;
             }
             List<KwaixiaodianCostDetail> adds = new ArrayList<>();
-            Long date = Long.valueOf(DateUtils.getNowDate("YYYYMMdd"));
+
             // 单品sku
             if (dataType == 1) {
                 for (int i = 0; i < orderList.size(); i++) {