yumeng 1 год назад
Родитель
Сommit
1a1a2901b9

+ 7 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/settlementJob.java

@@ -139,6 +139,13 @@ public class settlementJob {
         ikuaishouSupplyChainService.deleteMgsPromoterBindChannelByDate(date);
         ikuaishouSupplyChainService.cleanMgsKuaiShouPromoterBindChannel(date);
 
+
+
+
+
+        ikuaishouSupplyChainService.deleteRocketPromoterBindChannelByDate(date);
+        ikuaishouSupplyChainService.cleanRocketKuaiShouPromoterBindChannel(date);
+
     }
 
 

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaishouSupplyChainMapper.java

@@ -40,4 +40,8 @@ public interface KuaishouSupplyChainMapper extends BaseMapper<KuaishouSupplyChai
     void cleanMgsKuaiShouPromoterBindChannel(@Param("date") Long date);
 
     List<JSONObject> getMgsDataList(@Param("statDate") Long statDate);
+
+    void deleteRocketPromoterBindChannelByDate(@Param("date") Long date);
+
+    void cleanRocketKuaiShouPromoterBindChannel(@Param("date") Long date);
 }

+ 18 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouSupplyChainMapper.xml

@@ -113,12 +113,30 @@
         and date_format(t1.create_time, '%Y%m%d')  &lt; #{date}
         group by t1.promoter_id
     </insert>
+    <insert id="cleanRocketKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
+        insert into rocket.promoter_bind_channel_date (promoter_id, promoter_name,promoter_url, user_id, user_name, stat_date,media_id)
+        select t1.promoter_id, t1.promoter_nick_name, t1.promoter_url,t1.user_id, t1.user_name, #{date},media_id
+        from rocket.kuaishou_promoter t1
+                 left join rocket.sys_user_role t2
+                           on t1.user_id = t2.user_id
+                 left join rocket.sys_role t3
+                           on t2.role_id = t3.role_id
+        where  1 = 1
+          and t1.media_id = '2'
+          and t3.role_key in ('bdManager', 'bd')
+          and date_format(t1.create_time, '%Y%m%d')  &lt; #{date}
+        group by t1.promoter_id
+
+    </insert>
     <delete id="deletePromoterBindChannelByDate" parameterType="java.lang.Long">
         delete from ruixuan.promoter_bind_channel_date where stat_date = #{date}
     </delete>
     <delete id="deleteMgsPromoterBindChannelByDate" parameterType="java.lang.Long">
         delete from miaogousi.promoter_bind_channel_date where stat_date = #{date}
     </delete>
+    <delete id="deleteRocketPromoterBindChannelByDate" parameterType="java.lang.Long">
+        delete from rocket.promoter_bind_channel_date where stat_date = #{date}
+    </delete>
     <select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
 
         select  id ,cookie  from ruixuan.kuaishou_supply_chain_cookie

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouSupplyChainService.java

@@ -37,4 +37,8 @@ public interface IKuaishouSupplyChainService extends IService<KuaishouSupplyChai
     void cleanMgsKuaiShouPromoterBindChannel(Long date);
 
     List<JSONObject> getMgsDataList(Long statDate);
+
+    void deleteRocketPromoterBindChannelByDate(Long date);
+
+    void cleanRocketKuaiShouPromoterBindChannel(Long date);
 }

+ 10 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouSupplyChainServiceImpl.java

@@ -244,6 +244,16 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
         return supplyChainMapper.getMgsDataList(statDate);
     }
 
+    @Override
+    public void deleteRocketPromoterBindChannelByDate(Long date) {
+         supplyChainMapper.deleteRocketPromoterBindChannelByDate(date);
+    }
+
+    @Override
+    public void cleanRocketKuaiShouPromoterBindChannel(Long date) {
+        supplyChainMapper.cleanRocketKuaiShouPromoterBindChannel(date);
+    }
+
     public static String filterSupplement(String content) {
         StringBuilder sb = new StringBuilder();
         for (char ch : content.toCharArray()) {