Ver código fonte

修改链接

yumeng 5 anos atrás
pai
commit
69f15ecf8d

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouMaterialsLoadJob.java

@@ -35,7 +35,7 @@ public class KuaishouMaterialsLoadJob implements Job {
                 Date endDate = new Date();
                 //1:查询当日数据
                 List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
-                executorService = Executors.newFixedThreadPool(5);
+                executorService = Executors.newFixedThreadPool(8);
                 tokens.forEach(token -> {
                     executorService.submit(new Runnable() {
                         @Override

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

@@ -315,11 +315,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 if (!Check.isNull(type)) {
                     kuaiShouVideoGet.setMaterialType(type);
                 }
-
-                //     kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
-                videoGets.add(kuaiShouVideoGet);
+                kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
+               // videoGets.add(kuaiShouVideoGet);
             }
-            kuaiShouVideoGetService.replaceBatch(videoGets);
+         //   kuaiShouVideoGetService.replaceBatch(videoGets);
             getVideoListByPage(token, startDate, endDate, page + 1);
 
         } catch (Exception e) {
@@ -3427,9 +3426,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             kuaiShouVideoGet.setId("" + accountId + kuaiShouVideoGet.getPhotoId());
             kuaiShouVideoGet.setCreateTime(new Date());
             kuaiShouVideoGet.setUpdateTime(new Date());
-            videoGets.add(kuaiShouVideoGet);
+          //  videoGets.add(kuaiShouVideoGet);
+            kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
         }
-        kuaiShouVideoGetService.replaceBatch(videoGets);
+       // kuaiShouVideoGetService.replaceBatch(videoGets);
         getVideoList(token, accountId, startDate, endDate, page + 1);
     }