Bladeren bron

注释预警操作

yumeng 4 jaren geleden
bovenliggende
commit
a2d883ab76

+ 5 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1236,11 +1236,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     static ExecutorService executorMaxBidService = Executors.newFixedThreadPool(5);
 
     private void addGroup(Long advertiserId, JSONArray details) {
-    /*    JSONObject json = warningOperationService.getBidTypeAndMaxBid(advertiserId);
+        JSONObject json = warningOperationService.getBidTypeAndMaxBid(advertiserId);
         Long maxBid = json.getLong("maxBid");// 最高出价
         Integer bidType = json.getInteger("bidType"); // 出价方式
         String ocpxActionTypeStr = json.getString("ocpxActionType"); // 优化目标
-        JSONArray bidArr = JSONArray.parseArray(ocpxActionTypeStr);*/
+        JSONArray bidArr = JSONArray.parseArray(ocpxActionTypeStr);
         if (!Check.isNull(details)) {
             List<KuaiShouGroup> groups = new ArrayList<>();
             for (int i = 0; i < details.size(); i++) {
@@ -1256,11 +1256,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     Integer status = detail.getInteger("status");
                     Integer put_status = detail.getInteger("put_status");
 
-                   /* if (put_status == 1) { // 组状态为 投放中的
+                    if (put_status == 1) { // 组状态为 投放中的
                         if (status != 15) { // 广告组状态为非暂停
                             Boolean trueOrFalse = false;
                             for (int j = 0; j < bidArr.size(); j++) {
-                                Integer ocpxActionType = (Integer) bidArr.get(i);
+                                Integer ocpxActionType = (Integer) bidArr.get(j);
                                 if (ocpxActionType.equals(ocpx_action_type)) {
                                     trueOrFalse = true;
                                     break;
@@ -1286,7 +1286,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                             }
                         }
                     }
-*/
 
                     KuaiShouGroup group = new KuaiShouGroup();
                     group.setId("" + advertiserId + unitId);
@@ -1362,7 +1361,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 param.put("start_date", DateUtils.formatDate(startDate));
                 param.put("end_date", DateUtils.formatDate(endDate));
             }
-            param.put("page_size", 200);
+            param.put("page_size", 500);
             param.put("page", page);
 
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);

+ 4 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/WarningOperationServiceImpl.java

@@ -67,8 +67,8 @@ public class WarningOperationServiceImpl implements IWarningOperationService {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        CtopOauthToken token = oauthTokenService.getTokenByAccountId(advertiserId);
-        updateService.updateUnitStatus(token.getAccessToken(), advertiserId, unitId, 2, "admin");
+       /* CtopOauthToken token = oauthTokenService.getTokenByAccountId(advertiserId);
+        updateService.updateUnitStatus(token.getAccessToken(), advertiserId, unitId, 2, "admin");*/
         WarningOperationLog warningOperationLog = new WarningOperationLog();
         warningOperationLog.setAccountId(advertiserId);
         warningOperationLog.setSubject("出价方式预警");
@@ -102,8 +102,8 @@ public class WarningOperationServiceImpl implements IWarningOperationService {
             e.printStackTrace();
         }
 
-        CtopOauthToken token = oauthTokenService.getTokenByAccountId(advertiserId);
-        updateService.updateUnitStatus(token.getAccessToken(), advertiserId, unitId, 2, "admin");
+        /*CtopOauthToken token = oauthTokenService.getTokenByAccountId(advertiserId);
+        updateService.updateUnitStatus(token.getAccessToken(), advertiserId, unitId, 2, "admin");*/
 
         WarningOperationLog warningOperationLog = new WarningOperationLog();
         warningOperationLog.setAccountId(advertiserId);