yumeng před 4 roky
rodič
revize
6c4f47cc4f

+ 2 - 20
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/BatchController.java

@@ -109,7 +109,6 @@ public class BatchController {
             SpendVo spendVo = new SpendVo();
             JSONObject fundJson = iKuaishouInterfaceService.fundGet(oauthToken);
 
-
             if (!Check.isNull(fundJson)) {
                 spendVo.setBalance(fundJson.getBigDecimal("balance")); // 余额
             }
@@ -120,15 +119,7 @@ public class BatchController {
             spendVo.setBudget(budget);
             result.setSuccess(true);
             result.setResult(spendVo);
-
             String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-            String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
-            String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
-
-
-            iKuaishouInterfaceService.getCampaignList(oauthToken, new java.util.Date(), new java.util.Date());
-
-
             Thread thread = new Thread() {
                 @Override
                 public void run() {
@@ -149,21 +140,12 @@ public class BatchController {
             Thread thread2 = new Thread() {
                 @Override
                 public void run() {
-                    // syncPullMaterialService.getSyncVideoList(accountId, nowDate, nowDate);
                     iKuaishouInterfaceService.getVideoList(oauthToken, nowDate, nowDate);
 
                 }
             };
             thread2.start();
 
-          /*  Thread thread3 = new Thread() {
-                @Override
-                public void run() {
-                    iKuaishouInterfaceService.getSuZaoList(oauthToken.getAccessToken(), accountId, 1, nowDate, endDate);
-                }
-            };
-            thread3.start();*/
-
             Thread thread4 = new Thread() {
                 @Override
                 public void run() {
@@ -172,7 +154,6 @@ public class BatchController {
                 }
             };
             thread4.start();
-
         } catch (Exception e) {
             e.printStackTrace();
             result.setSuccess(false);
@@ -198,10 +179,11 @@ public class BatchController {
                                                            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                            HttpServletRequest req) {
         Result<IPage<KuaiShouCampaign>> result = new Result<>();
+        CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(kuaiShouCampaign.getAccountId());
+        iKuaishouInterfaceService.getCampaignList(oauthToken, new java.util.Date(), new java.util.Date());
         String campaignName = kuaiShouCampaign.getCampaignName();
         kuaiShouCampaign.setCampaignName(null);
         if (!Check.isNull(kuaiShouCampaign.getCampaignId())) {
-            CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(kuaiShouCampaign.getAccountId());
             iKuaishouInterfaceService.getCampaign(oauthToken.getAccessToken(), kuaiShouCampaign.getAccountId(), kuaiShouCampaign.getCampaignId());
         }
         QueryWrapper<KuaiShouCampaign> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaign, req.getParameterMap());