|
@@ -7,6 +7,9 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
+
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@Component
|
|
@Component
|
|
|
public class FeishuPushJob {
|
|
public class FeishuPushJob {
|
|
@@ -33,84 +36,118 @@ public class FeishuPushJob {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
IFeishuService feishuService;
|
|
IFeishuService feishuService;
|
|
|
|
|
|
|
|
|
|
+ private static ExecutorService sendExecutor = Executors.newFixedThreadPool(2);
|
|
|
|
|
+ private static ExecutorService reportsAdPushExecutor = Executors.newFixedThreadPool(2);
|
|
|
|
|
+ private static ExecutorService totalRankPushExecutor = Executors.newFixedThreadPool(2);
|
|
|
|
|
+ private static ExecutorService movieRankExecutor = Executors.newFixedThreadPool(2);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@XxlJob("unbindWarnPush")
|
|
@XxlJob("unbindWarnPush")
|
|
|
- public void unbindWarnPush(){
|
|
|
|
|
|
|
+ public void unbindWarnPush() {
|
|
|
unbindWarnPushService.send();
|
|
unbindWarnPushService.send();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@XxlJob("bindAppErrorWarnPush")
|
|
@XxlJob("bindAppErrorWarnPush")
|
|
|
- public void bindAppErrorWarnPush(){
|
|
|
|
|
|
|
+ public void bindAppErrorWarnPush() {
|
|
|
bindAppErrorWarnService.send();
|
|
bindAppErrorWarnService.send();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//投放战报
|
|
//投放战报
|
|
|
@XxlJob("reportsAdPush")
|
|
@XxlJob("reportsAdPush")
|
|
|
- public void reportsAdPush(){
|
|
|
|
|
- reportsAdPushService.send();
|
|
|
|
|
|
|
+ public void reportsAdPush() {
|
|
|
|
|
+ reportsAdPushExecutor.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ reportsAdPushService.send();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//优化师实时战报(小组排行榜)
|
|
//优化师实时战报(小组排行榜)
|
|
|
@XxlJob("optimizerRankPush")
|
|
@XxlJob("optimizerRankPush")
|
|
|
- public void optimizerRankPush(){
|
|
|
|
|
- optimizerRankPushService.send();
|
|
|
|
|
|
|
+ public void optimizerRankPush() {
|
|
|
|
|
+ sendExecutor.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ optimizerRankPushService.send();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//优化师实时战绩
|
|
//优化师实时战绩
|
|
|
@XxlJob("totalRankPush")
|
|
@XxlJob("totalRankPush")
|
|
|
- public void totalRankPush(){
|
|
|
|
|
- totalRankPushService.send();
|
|
|
|
|
|
|
+ public void totalRankPush() {
|
|
|
|
|
+ totalRankPushExecutor.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ totalRankPushService.send();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//短剧业务概况(投放)
|
|
//短剧业务概况(投放)
|
|
|
@XxlJob("dateReportsPush")
|
|
@XxlJob("dateReportsPush")
|
|
|
- public void dateReportsPush(){
|
|
|
|
|
|
|
+ public void dateReportsPush() {
|
|
|
dateReportsPushService.send();
|
|
dateReportsPushService.send();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@XxlJob("reportsByBusinessPush")
|
|
@XxlJob("reportsByBusinessPush")
|
|
|
- public void reportByBusinessPush(){
|
|
|
|
|
|
|
+ public void reportByBusinessPush() {
|
|
|
reportsByBusinessPushService.send();
|
|
reportsByBusinessPushService.send();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//短剧业务概况预投放(12点)
|
|
//短剧业务概况预投放(12点)
|
|
|
@XxlJob("preDateReportsPush")
|
|
@XxlJob("preDateReportsPush")
|
|
|
- public void preDataReportsPush(){
|
|
|
|
|
|
|
+ public void preDataReportsPush() {
|
|
|
dateReportsPushService.send12hour();
|
|
dateReportsPushService.send12hour();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//短剧业务概况预投放-给开发
|
|
//短剧业务概况预投放-给开发
|
|
|
@XxlJob("dataReportsToDeveloper")
|
|
@XxlJob("dataReportsToDeveloper")
|
|
|
- public void dataReportsToDeveloper(){
|
|
|
|
|
|
|
+ public void dataReportsToDeveloper() {
|
|
|
dateReportsPushService.preSend();
|
|
dateReportsPushService.preSend();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//剪辑排行榜
|
|
//剪辑排行榜
|
|
|
@XxlJob("cutGroupRankPush")
|
|
@XxlJob("cutGroupRankPush")
|
|
|
- public void cutGroupRankPush(){
|
|
|
|
|
|
|
+ public void cutGroupRankPush() {
|
|
|
cutGroupRankPushService.send();
|
|
cutGroupRankPushService.send();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@XxlJob("loginRecordPush")
|
|
@XxlJob("loginRecordPush")
|
|
|
- public void loginRecordPush(){
|
|
|
|
|
|
|
+ public void loginRecordPush() {
|
|
|
userLoginRecordService.queryUserLoginRecord();
|
|
userLoginRecordService.queryUserLoginRecord();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@XxlJob("pullFeishuAvatar")
|
|
@XxlJob("pullFeishuAvatar")
|
|
|
- public void pullFeishuAvatar(){
|
|
|
|
|
|
|
+ public void pullFeishuAvatar() {
|
|
|
try {
|
|
try {
|
|
|
feishuService.uploadAvatar();
|
|
feishuService.uploadAvatar();
|
|
|
- }catch (Exception e){
|
|
|
|
|
- log.error("pullFeishuAvatar error: "+e.getMessage(), e);
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("pullFeishuAvatar error: " + e.getMessage(), e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@XxlJob("distributionPush")
|
|
@XxlJob("distributionPush")
|
|
|
- public void distributionPush(){
|
|
|
|
|
|
|
+ public void distributionPush() {
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@XxlJob("movieTopPush")
|
|
@XxlJob("movieTopPush")
|
|
|
- public void movieTopPush(){
|
|
|
|
|
- movieRankPushService.send();
|
|
|
|
|
|
|
+ public void movieTopPush() {
|
|
|
|
|
+
|
|
|
|
|
+ movieRankExecutor.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ movieRankPushService.send();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|