ソースを参照

修改头条视频数据实体类

syh 4 年 前
コミット
818a51f3fd

+ 1 - 50
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -9,13 +9,9 @@ import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
 import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.kuaishou.modules.batch.service.*;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
-import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
-import cn.com.ctop.oa.modules.service.IWechatDepartmentService;
-import cn.com.ctop.oa.modules.service.IWechatNoListService;
-import cn.com.ctop.oa.modules.service.IWechatUserListService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
@@ -31,7 +27,6 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
-import java.text.ParseException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -51,54 +46,12 @@ public class SampleTest {
     @Autowired
     private IReportService reportService;
     @Autowired
-    private IUserAllocationService userAllocationService;
-    @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
     @Autowired
     private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
-    @Autowired
-    private IKuaiShouDailyReportTaskService dailyReportTaskService;
 
     @Autowired
-    private IWechatDepartmentService wechatDepartment;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    @Autowired
-    private IWechatUserListService wechatUserInfoService;
-    @Autowired
-    private IWechatCheckinDataService wechatCheckinDataService;
-    @Autowired
-    private IWechatNoListService wechatNoListService;
-    @Autowired
     private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouRealTimeDataService realTimeDataService;
-
-    @Autowired
-    private IKuaiShouCreativeService creativeService;
-    @Autowired
-    private IMessageTemplate messageTemplate;
-
-    @Autowired
-    private ISendMessageService sendMessageService;
-
-    @Autowired
-    private IKuaiShouOverRunSendMessageService overRunSendMessageService;
-
-
-    @Test
-    public void getDepartment() throws ParseException {
-
-      /*  String message = messageTemplate.getCreativeOverRunMessage(23212L, 2000, "hahah");
-        //  LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        sendMessageService.sendMessage("14c3cd
-        5e5e434211a9bb5e8f9d8a335d", message);*/
-
-        overRunSendMessageService.creativeOverRunSendMessage(23212L);
-
-
-    }
-
 
     @Test
     public void loadBytedanceCreativeData() {
@@ -109,7 +62,6 @@ public class SampleTest {
             kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-20", "2020-09-20", "daily");
 
         }
-
     }
 
     @Test
@@ -244,7 +196,6 @@ public class SampleTest {
                 Date getDate = DateUtils.addDay(new Date(), -i);
                 String date = DateUtils.formatDate(getDate);
                 bytedanceReportService.bytedanceMaterialReport(token, date, date);
-//            videoReportDailyService.videoInfoList(date, date);
             }
 
         }

+ 26 - 0
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceVideoReportCleanJob.java

@@ -0,0 +1,26 @@
+package cn.com.ctop.job.bytedance.handler;
+
+import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+@Component
+public class BytedanceVideoReportCleanJob {
+    @Autowired
+    private IByteDanceVideoReportDailyService videoReportDailyService;
+
+    @XxlJob("bytedanceVideoReportCleanJob")
+    public ReturnT<String> execute(String param) throws Exception {
+        for(int i=0;i<2;i++){
+            Date getDate = DateUtils.addDay(new Date(), -i);
+            String date = DateUtils.formatDate(getDate);
+            videoReportDailyService.videoInfoList(date, date);
+        }
+        return ReturnT.SUCCESS;
+    }
+}

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

@@ -286,12 +286,12 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
 
     private void getDailyTypeList() {
         dailyTypeList = new ArrayList<>();
-//        dailyTypeList.add(2);
-//        dailyTypeList.add(3);
-//        dailyTypeList.add(4);
-//        dailyTypeList.add(5);
-//        dailyTypeList.add(10);
-        historyTypeList.add(7);
+        dailyTypeList.add(2);
+        dailyTypeList.add(3);
+        dailyTypeList.add(4);
+        dailyTypeList.add(5);
+        dailyTypeList.add(10);
+//        historyTypeList.add(7);
     }