瀏覽代碼

修改头条视频报表展示数为0 bug

syh 4 年之前
父節點
當前提交
272f418c7a

+ 2 - 2
jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties

@@ -1,8 +1,8 @@
 #mysql
 diver_name=com.mysql.jdbc.Driver
-url=jdbc:mysql://139.186.27.96:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
+url=jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
 username=hcst
-password=test@20190531
+password=hcst@2020
 database_name=jeecg-boot
 #oracle
 #diver_name=oracle.jdbc.driver.OracleDriver

+ 24 - 13
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -20,7 +20,9 @@ import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
 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.IBytedanceFundDailyService;
+import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
 import cn.com.ctop.toutiao.modules.report.service.IReportService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
@@ -260,6 +262,18 @@ public class SampleTest {
         }
     }
 
+    @Autowired
+    private IBytedanceReportService bytedanceReportService;
+    @Test
+    public void loadBytedanceVideoReportData(){
+        Date getDate = DateUtils.addDay(new Date(), -1);
+        String date = DateUtils.formatDate(getDate);
+        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
+        for (CtopOauthToken token:tokens){
+            bytedanceReportService.bytedanceVideoMaterialReport(token, date, date);
+        }
+    }
+
     @Test
     public void loadKuaishouHourlyReportData() {
         Date getDate = new Date();
@@ -305,19 +319,6 @@ public class SampleTest {
     private IKuaishouCostGroupService kuaishouCostGroupService;
     @Autowired
     private IAlarmEventSendService alarmEventSendService;
-
-    @Test
-    public void addTest() {
-        kuaishouCostGroupService.saveInfo();
-    }
-
-    @Test
-    public void sendTest() {
-        //检查频率 HOUR - 每小时;HALF_HOUR-每半小时
-        alarmEventSendService.matchAlarmRules("HOUR");
-    }
-
-
     @Autowired
     private IWechatCheckinDataService wechatCheckinDataService;
     @Autowired
@@ -353,6 +354,16 @@ public class SampleTest {
     public void kuaishouDeleteComment(){
         kuaiShouCommentService.shieldComment(8018853L);
     }
+    @Autowired
+    private IByteDanceVideoReportDailyService videoReportDailyService;
 
+    @Test
+    public void formatVideoReportData(){
+        for(int i=1;i<45;i++){
+            Date getDate = DateUtils.addDay(new Date(), -i);
+            String date = DateUtils.formatDate(getDate);
+            videoReportDailyService.videoInfoList(date, date);
+        }
+    }
 
 }

+ 0 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java

@@ -37,7 +37,6 @@ public class BytedanceVideoReportCtrl {
 
     @PostMapping("/list")
     public Result<PageInfo<JSONObject>> getListReport(@RequestBody JSONObject requestBody) {
-
         Result<PageInfo<JSONObject>> result = new Result<>();
         if (requestBody.isEmpty()) {
             log.error("request body is empty");
@@ -53,9 +52,7 @@ public class BytedanceVideoReportCtrl {
             String order = requestBody.getString("order");
             int pageSize = requestBody.getInteger("pageSize");
             int pageNo = requestBody.getInteger("pageNo");
-
             String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapByVideo);
-
             try {
                 if (accountIds.isEmpty()) {
                     accountIds = null;

+ 0 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/entity/BytedanceReportVideoMaterialDaily.java

@@ -151,7 +151,6 @@ public class BytedanceReportVideoMaterialDaily {
 		this.accountId = accountId;
 		this.setMaterialId(dimensions.getLong("material_id"));
 		this.setStatDatetime(dimensions.getDate("stat_datetime") == null ? null : DateUtils.formatDate(dimensions.getDate("stat_datetime"), "yyyy-MM-dd"));
-
 		JSONObject metrics = detailJson.getJSONObject("metrics");
 		this.setValidPlayCost(metrics.getBigDecimal("valid_play_cost"));
 		this.setClick(metrics.getLong("click"));

+ 5 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/ByteDanceVideoReportDailyMapper.xml

@@ -485,7 +485,8 @@
         average_play_time_per_play,
         convert_cost,
         install_finish_cost,
-        download_start_rate
+        download_start_rate,
+        show_material
         )
         values
         <foreach collection="mlist" item="image" separator=",">
@@ -583,7 +584,9 @@
             #{image.averagePlayTimePerPlay},
             #{image.convertCost},
             #{image.installFinishCost},
-            #{image.downloadStartRate})
+            #{image.downloadStartRate},
+            #{image.showMaterial}
+            )
         </foreach>
     </insert>