Pārlūkot izejas kodu

修改快手定时任务清洗逻辑

songyh 3 gadi atpakaļ
vecāks
revīzija
cf0c21f2be

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

@@ -25,4 +25,6 @@ public interface EtlKuaishouAccountMaterialReportDailyMapper extends BaseMapper<
     void etlKuaishouReportCompanyInfo(@Param(value = "formatDate") String formatDate);
     void etlKuaishouReportCompanyInfo(@Param(value = "formatDate") String formatDate);
 
 
     void etlKuaishouVideoReportStateDate();
     void etlKuaishouVideoReportStateDate();
+
+    void etlKuaishouVideoCompanyInfo();
 }
 }

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

@@ -224,6 +224,13 @@
             a.minDate IS NOT NULL
             a.minDate IS NOT NULL
           AND info.state_date IS NULL
           AND info.state_date IS NULL
     </update>
     </update>
+    <update id="etlKuaishouVideoCompanyInfo">
+        update ctop_etl_kuaishou_video_info video left join user_company uc on video.clip_id = uc.user_id
+            set video.company_name = uc.company_name
+        where video.clip_id is not null
+            and uc.company_name is not null
+            and video.company_name is null
+    </update>
     <select id="etlKuaishouAccountMaterialReportDailyList"
     <select id="etlKuaishouAccountMaterialReportDailyList"
             resultType="cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouAccountMaterialReportDaily">
             resultType="cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouAccountMaterialReportDaily">
     select
     select

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

@@ -80,6 +80,7 @@ public class EtlKuaishouAccountMaterialReportDailyServiceImpl extends ServiceImp
     @Override
     @Override
     public void etlKuaishouReportCompanyInfo(String formatDate) {
     public void etlKuaishouReportCompanyInfo(String formatDate) {
         etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouReportCompanyInfo(formatDate);
         etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouReportCompanyInfo(formatDate);
+        etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouVideoCompanyInfo();
     }
     }
 
 
     @Override
     @Override

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/link/mapper/ETLReportBytedanceVideoMapper.java

@@ -42,4 +42,7 @@ public interface ETLReportBytedanceVideoMapper extends BaseMapper<ETLReportByted
     void updateClipInfo(@Param("clipId")String clipId, @Param("clipName")String clipName, @Param("md5")String md5);
     void updateClipInfo(@Param("clipId")String clipId, @Param("clipName")String clipName, @Param("md5")String md5);
     void updateShotInfo(@Param("shotId")String shotId, @Param("shotName")String shotName, @Param("md5")String md5);
     void updateShotInfo(@Param("shotId")String shotId, @Param("shotName")String shotName, @Param("md5")String md5);
     void updatePlanInfo(@Param("planId")String planId, @Param("planName")String planName, @Param("md5")String md5);
     void updatePlanInfo(@Param("planId")String planId, @Param("planName")String planName, @Param("md5")String md5);
+
+    void updateTeamLeader();
+    void updateDesignTeamLeader();
 }
 }

+ 16 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/link/mapper/xml/ETLReportBytedanceVideoMapper.xml

@@ -210,6 +210,22 @@
     <update id="updatePlanInfo">
     <update id="updatePlanInfo">
         update etl_report_bytedance_video set plan_id=#{planId},plan_name=#{planName} where md5=#{md5}
         update etl_report_bytedance_video set plan_id=#{planId},plan_name=#{planName} where md5=#{md5}
     </update>
     </update>
+    <update id="updateDesignTeamLeader">
+        update etl_report_bytedance_video video left join sys_user su on video.clip_id = su.id
+            set video.team_leader = su.design_team_leader_name
+        where video.clip_id is not null
+            and video.team_leader is null
+            and su.design_team_leader_name is not null
+            and su.design_team_leader_name != ''
+    </update>
+    <update id="updateTeamLeader">
+        update etl_report_bytedance_video video left join sys_user su on video.clip_id = su.id
+            set video.team_leader = su.leader_name
+        where video.clip_id is not null
+            and su.leader_name is not null
+            and video.team_leader is null
+            and su.leader_name != ''
+    </update>
 
 
     <delete id="deleteDuplicateVideoInfo">
     <delete id="deleteDuplicateVideoInfo">
         delete from
         delete from

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/link/service/impl/ETLReportBytedanceVideoServiceImpl.java

@@ -69,6 +69,8 @@ public class ETLReportBytedanceVideoServiceImpl extends ServiceImpl<ETLReportByt
                 etlReportBytedanceVideoMapper.updateClipInfo(clipInfo.getClipId(),clipInfo.getClipName(),clipInfo.getMd5());
                 etlReportBytedanceVideoMapper.updateClipInfo(clipInfo.getClipId(),clipInfo.getClipName(),clipInfo.getMd5());
             });
             });
         }
         }
+        etlReportBytedanceVideoMapper.updateDesignTeamLeader();
+        etlReportBytedanceVideoMapper.updateTeamLeader();
     }
     }
 
 
     @Override
     @Override