浏览代码

test 批量修改手淘账户出价

yumeng 4 年之前
父节点
当前提交
5e58b12b67

+ 21 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -110,9 +110,17 @@ public class TestController {
         list.add(7883032L);
         list.add(7922257L);*/
 
+
         list.add(9556344L);
-        list.add(9743738L);
+        list.add(9556274L);
+        list.add(9767055L);
         list.add(9743727L);
+        list.add(9743746L);
+        list.add(9792538L);
+        list.add(9767096L);
+        list.add(9743738L);
+        list.add(9812671L);
+        list.add(9838554L);
 
 
         for (int i = 0; i < list.size(); i++) {
@@ -164,14 +172,24 @@ public class TestController {
     @GetMapping(value = "/updateUnit")
     public void updateUnit() throws Exception {
         List<Long> list = new ArrayList();
+
         list.add(9556344L);
-        list.add(9743738L);
+        list.add(9556274L);
+        list.add(9767055L);
         list.add(9743727L);
+        list.add(9743746L);
+        list.add(9792538L);
+        list.add(9767096L);
+        list.add(9743738L);
+        list.add(9812671L);
+        list.add(9838554L);
+
         for (int i = 0; i < list.size(); i++) {
             Long accountId = list.get(i);
             CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
             QueryWrapper<KuaiShouGroup> groupQueryWrapper = new QueryWrapper<>();
             groupQueryWrapper.eq("account_id", accountId);
+            // groupQueryWrapper.ne("cpa_bid", 24000);
             //      groupQueryWrapper.ne("schedule_time","000000111111111111111111000000111111111111111111000000111111111111111111000000111111111111111111000000111111111111111111000000111111111111111111000000111111111111111111");
             //     groupQueryWrapper.eq("use_app_market", 1);
 
@@ -194,7 +212,7 @@ public class TestController {
                         try {
                             JSONObject json = new JSONObject();
                             json.put("unitId", group.getUnitId());
-                            json.put("cpaBid", 25 * 1000);
+                            json.put("cpaBid", 24 * 1000);
                             //     json.put("gender", "2");
                             batchService.updateUnit(json, oauthToken);
                             Thread.sleep(1000);

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

@@ -1302,7 +1302,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GROUP_LIST;
         JSONObject param = new JSONObject();
         param.put("advertiser_id", token.getAccountId());
-        param.put("page_size", 200);
+        param.put("page_size", 500);
         param.put("page", page);
         if (startDate != null && endDate != null) {
             param.put("start_date", DateUtils.formatDate(startDate));
@@ -1380,7 +1380,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             }
             if (!Check.isNull(groups)) {
                 try {
-                    Thread.sleep(200L);
+                    Thread.sleep(1000L);
                     groupMapper.replaceBatch(groups);
                 } catch (InterruptedException e) {
                     e.printStackTrace();