فهرست منبع

头条视频报表增加素材上传时间、素材名称字段,视频报表增加素材上传时间字段

hcst_sunzhen 5 سال پیش
والد
کامیت
738d57b5f7

+ 6 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/entity/ByteDanceVideoInfo.java

@@ -113,6 +113,10 @@ public class ByteDanceVideoInfo {
 
     private String source;
 
+    private Date materialUploadTime;
+
+    private String filename;
+
     public ByteDanceVideoInfo(JSONObject data, CtopOauthToken token) {
         this.id = data.getString("id");
         this.fileId = data.getString("video_id");
@@ -134,6 +138,8 @@ public class ByteDanceVideoInfo {
         Date now = new Date();
         this.createTime = now;
         this.updateTime = now;
+        this.materialUploadTime = data.getDate("create_time");
+        this.filename = data.getString("filename");
     }
 
     public ByteDanceVideoInfo() {

+ 4 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/xml/ByteDanceVideoInfoMapper.xml

@@ -8,6 +8,8 @@
         account_id,
         material_id,
         url,
+        material_upload_time,
+        filename,
         format,
         poster_url,
         bit_rate,
@@ -30,6 +32,8 @@
             #{video.accountId},
             #{video.materialId},
             #{video.url},
+            #{video.materialUploadTime},
+            #{video.filename},
             #{video.format},
             #{video.posterUrl},
             #{video.bitRate},

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

@@ -432,4 +432,7 @@ public class ByteDanceVideoReportDaily {
 
 	@TableField(exist = false)
 	private String materialDesc;
+
+	@TableField(exist = false)
+	private String materialUploadTime;
 }

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

@@ -39,6 +39,11 @@
         a.video_url                              as videoUrl,
         '-'                                      as materialDesc,
         (select info.url from ctop_material_info info where info.code = a.signature limit 1)                                    as url,
+        (select
+            case when video.material_upload_time is null then '-'
+            else video.material_upload_time
+            end as materialUploadTime
+        from ctop_bytedance_video_info video where video.signature = a.signature limit 1)           as materialUploadTime,
         1                                        as appType,
         sum(a.click)                             as clickMaterial,                  -- 点击数