|
|
@@ -25,6 +25,7 @@ public class ToolsSiteJob {
|
|
|
|
|
|
private static ExecutorService avatarExecutorService = Executors.newFixedThreadPool(3);
|
|
|
private static ExecutorService nameExecutorService = Executors.newFixedThreadPool(3);
|
|
|
+ private static ExecutorService appExecutorService = Executors.newFixedThreadPool(3);
|
|
|
private static ExecutorService wxappExecutorService = Executors.newFixedThreadPool(3);
|
|
|
private static ExecutorService ttappExecutorService = Executors.newFixedThreadPool(3);
|
|
|
private static ExecutorService siteExecutorService = Executors.newFixedThreadPool(3);
|
|
|
@@ -39,17 +40,18 @@ public class ToolsSiteJob {
|
|
|
//头像待更新的广告主id集
|
|
|
List<Long> avatarIds = toolsSiteService.getAvatarAdvertiserIds();
|
|
|
if (!Check.isNull(avatarIds)) {
|
|
|
- avatarIds.forEach(id -> avatarExecutorService.submit(() -> {
|
|
|
- toolsSiteService.updateAvatarStatus(id);
|
|
|
- }));
|
|
|
+ avatarIds.forEach(id -> avatarExecutorService.submit(() -> toolsSiteService.updateAvatarStatus(id)));
|
|
|
}
|
|
|
|
|
|
//广告名称待更新的广告主id集
|
|
|
List<Long> nameIds = toolsSiteService.getNameAdvertiserIds();
|
|
|
if (!Check.isNull(nameIds)) {
|
|
|
- nameIds.forEach(id -> nameExecutorService.submit(() -> {
|
|
|
- toolsSiteService.updateNameStatus(id);
|
|
|
- }));
|
|
|
+ nameIds.forEach(id -> nameExecutorService.submit(() -> toolsSiteService.updateNameStatus(id)));
|
|
|
+ }
|
|
|
+
|
|
|
+ List<JSONObject> appList = toolsSiteService.getTimeOutAppList();
|
|
|
+ if (!Check.isNull(appList)) {
|
|
|
+ appList.forEach(app -> appExecutorService.submit(() -> toolsSiteService.pushAgain(app)));
|
|
|
}
|
|
|
|
|
|
//微信
|
|
|
@@ -86,7 +88,7 @@ public class ToolsSiteJob {
|
|
|
List<JSONObject> sids = toolsSiteService.getSiteAdvertiserIds2();
|
|
|
if (!Check.isNull(siteIds)) {
|
|
|
sids.forEach(o -> siteExecutorService.submit(() -> {
|
|
|
- toolsSiteService.publishSiteStatus(o.getLong("advertiser_id"),o.getString("task_id"));
|
|
|
+ toolsSiteService.publishSiteStatus(o.getLong("advertiser_id"), o.getString("task_id"));
|
|
|
}));
|
|
|
}
|
|
|
}
|