Browse Source

凌晨发送数据

zhaotx 1 year ago
parent
commit
99637dcc75

+ 5 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/IDateReportsPushService.java

@@ -2,4 +2,9 @@ package cn.com.ctop.job.bytedance.data.service;
 
 public interface IDateReportsPushService {
     void send();
+
+    /**
+     * 零点15执行的 比上一天多了个描述
+     */
+    void preSend();
 }

+ 12 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/DateReportsPushServiceImpl.java

@@ -33,10 +33,20 @@ public class DateReportsPushServiceImpl implements IDateReportsPushService {
     @Autowired
     ReportsAdPushMapper reportsPushMapper;
 
-    private static final String TEMPLATE_VERSION = "1.0.2";
+    private static final String TEMPLATE_VERSION = "1.0.3";
     private static final String TEMPLATE_ID = "AAqRhJzMBoO0E";
     @Override
     public void send() {
+        sendParam("");
+    }
+
+    @Override
+    public void preSend() {
+        sendParam("注:当天ROI数据有微小1%-2%差异,以次日9点推送为准");
+    }
+
+
+    private void sendParam(String description){
         String token;
         try {
             token = FeishuRobotUtil.getTenantToken(APP_ID, APP_KEY);
@@ -130,6 +140,7 @@ public class DateReportsPushServiceImpl implements IDateReportsPushService {
         template_variable.put("dateIndicatorTable", dateIndicatorTable);
         template_variable.put("movieRankTable", movieRankTable);
         template_variable.put("deptRank", deptRank);
+        template_variable.put("description", description);
 
         List<String> userIds = Arrays.asList(
                 "44fbaed6" //zhaotx

+ 5 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/FeishuPushJob.java

@@ -53,4 +53,9 @@ public class FeishuPushJob {
     public void loginRecordPush(){
         userLoginRecordService.queryUserLoginRecord();
     }
+
+    @XxlJob("preDateReportsPush")
+    public void preDataReportsPush(){
+        dateReportsPushService.preSend();
+    }
 }