syh 4 年 前
コミット
c2d9d30e48

+ 1 - 35
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/EtlKuaishouVideoInfo.java

@@ -30,74 +30,40 @@ public class EtlKuaishouVideoInfo {
 
 	/**id*/
 	@TableId(type = IdType.AUTO)
-    @ApiModelProperty(value = "id")
 	private Long id;
 	/**视频唯一标识*/
-	@Excel(name = "视频唯一标识", width = 15)
-    @ApiModelProperty(value = "视频唯一标识")
 	private String videoCode;
 	/**初次产生消耗时间*/
-	@Excel(name = "初次产生消耗时间", width = 15, format = "yyyy-MM-dd")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern="yyyy-MM-dd")
-    @ApiModelProperty(value = "初次产生消耗时间")
 	private Date stateDate;
 	/**url*/
-	@Excel(name = "url", width = 15)
-    @ApiModelProperty(value = "url")
 	private String url;
 	/**coverUrl*/
-	@Excel(name = "coverUrl", width = 15)
-    @ApiModelProperty(value = "coverUrl")
 	private String coverUrl;
 	/**渠道类型*/
-	@Excel(name = "渠道类型", width = 15)
-    @ApiModelProperty(value = "渠道类型")
 	private String channelType;
 	/**渠道名称*/
-	@Excel(name = "渠道名称", width = 15)
-    @ApiModelProperty(value = "渠道名称")
 	private String channelName;
 	/**companyName*/
-	@Excel(name = "companyName", width = 15)
-    @ApiModelProperty(value = "companyName")
+	private String companyId;
 	private String companyName;
 	/**planId*/
-	@Excel(name = "planId", width = 15)
-    @ApiModelProperty(value = "planId")
 	private String planId;
 	/**planName*/
-	@Excel(name = "planName", width = 15)
-    @ApiModelProperty(value = "planName")
 	private String planName;
 	/**clipId*/
-	@Excel(name = "clipId", width = 15)
-    @ApiModelProperty(value = "clipId")
 	private String clipId;
 	/**clipName*/
-	@Excel(name = "clipName", width = 15)
-    @ApiModelProperty(value = "clipName")
 	private String clipName;
 	/**shotId*/
-	@Excel(name = "shotId", width = 15)
-    @ApiModelProperty(value = "shotId")
 	private String shotId;
 	/**shotName*/
-	@Excel(name = "shotName", width = 15)
-    @ApiModelProperty(value = "shotName")
 	private String shotName;
 	/**designTeamLeaderId*/
-	@Excel(name = "designTeamLeaderId", width = 15)
-    @ApiModelProperty(value = "designTeamLeaderId")
 	private String designTeamLeaderId;
 	/**designTeamLeaderName*/
-	@Excel(name = "designTeamLeaderName", width = 15)
-    @ApiModelProperty(value = "designTeamLeaderName")
 	private String designTeamLeaderName;
 	/**createTime*/
-    @ApiModelProperty(value = "createTime")
 	private Date createTime;
 	/**updateTime*/
-    @ApiModelProperty(value = "updateTime")
 	private Date updateTime;
 }

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/EtlKuaishouVideoInfoServiceImpl.java

@@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.awt.*;
 import java.util.Date;
 import java.util.List;
 

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/EtlKuaishouReportVideoDailyMapper.java

@@ -2,6 +2,7 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportVideoDaily;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 快手视频分日报表信息
@@ -10,5 +11,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @cersion: V1.0
  */
 public interface EtlKuaishouReportVideoDailyMapper extends BaseMapper<EtlKuaishouReportVideoDaily> {
-
+    void etlKuaishouVideoReportDailyByDate(@Param(value = "data") String date);
 }

+ 77 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/EtlKuaishouReportVideoDailyMapper.xml

@@ -2,4 +2,81 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouReportVideoDailyMapper">
 
+    <insert id="etlKuaishouVideoReportDailyByDate">
+        replace into ctop_etl_kuaishou_report_video_daily (
+    stat_date,
+    video_code,
+    charge,
+    photo_show,
+    aclick,
+    photo_share,
+    photo_comment,
+    photo_like,
+    follow,
+    cancel_follow,
+    report,
+    block,
+    negative,
+    download_started,
+    download_completed,
+    activation,
+    submit,
+    photo_click,
+    event_pay_first_day,
+    event_pay_purchase_amount_first_day,
+    event_pay,
+    event_pay_purchase_amount,
+    event_register,
+    event_jin_jian_app,
+    event_credit_grant_app,
+    event_order_paid,
+    event_order_paid_purchase_amount,
+    event_jin_jian_landing_page ,
+    event_credit_grant_landing_page ,
+    event_next_day_stay_cost ,
+    event_order_paid_cost ,
+    event_next_day_stay,
+    form_cost ,
+    form_count,
+    play_3s_count
+) select  stat_date,
+        signature as video_code,
+        sum(charge) as charge,
+        sum(photo_show) as photo_show,
+        sum(aclick)as aclick,
+        sum(photo_share)as photo_share,
+        sum(photo_comment)as photo_comment,
+        sum(photo_like)as photo_like,
+        sum(follow)as follow,
+        sum(cancel_follow) as cancel_follow,
+        sum(report)as report,
+        sum(block)as block,
+        sum(negative)as negative ,
+        sum(download_started)as download_started ,
+        sum(download_completed)as download_completed,
+        sum(activation)as activation ,
+        sum(submit)as submit ,
+        sum(photo_click)as photo_click ,
+        sum(event_pay_first_day)as event_pay_first_day ,
+        sum(event_pay_purchase_amount_first_day)as event_pay_purchase_amount_first_day ,
+        sum(event_pay)as event_pay ,
+        sum(event_pay_purchase_amount)as event_pay_purchase_amount ,
+        sum(event_register)as event_register ,
+        sum(event_jin_jian_app)as event_jin_jian_app ,
+        sum(event_credit_grant_app)as event_credit_grant_app ,
+        sum(event_order_paid)as event_order_paid ,
+        sum(event_order_paid_purchase_amount)as event_order_paid_purchase_amount ,
+        sum(event_jin_jian_landing_page)as event_jin_jian_landing_page ,
+        sum(event_credit_grant_landing_page)as event_credit_grant_landing_page ,
+        sum(event_next_day_stay_cost)as event_next_day_stay_cost ,
+        sum(event_order_paid_cost)as event_order_paid_cost ,
+        sum(event_next_day_stay )as event_next_day_stay,
+        sum(form_cost)as form_cost ,
+        sum(form_count )as form_count,
+        sum(play_3s_ratio*photo_show)as play_3s_count
+from ctop_kuaishou_report_daily_material
+where stat_date = #{date}
+  and signature is not null
+group by signature;
+    </insert>
 </mapper>

+ 5 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportVideoDailyServiceImpl.java

@@ -6,6 +6,8 @@ import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportVideoDailyS
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 /**
  * 快手视频分日报表信息
  * @author jeecg-boot
@@ -14,9 +16,11 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class EtlKuaishouReportVideoDailyServiceImpl extends ServiceImpl<EtlKuaishouReportVideoDailyMapper, EtlKuaishouReportVideoDaily> implements IEtlKuaishouReportVideoDailyService {
+    @Resource
+    private EtlKuaishouReportVideoDailyMapper etlKuaishouReportVideoDailyMapper;
     @Override
     public void etlKuaishouVideoReportDaily(String date){
         //1:根据日期查询当前素材消耗数据
-
+        etlKuaishouReportVideoDailyMapper.etlKuaishouVideoReportDailyByDate(date);
     }
 }