yumeng il y a 1 an
Parent
commit
831a8c9e5b

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

@@ -188,7 +188,7 @@ public class SampleTest {
         for (int i = 1; i < 45; i++) {
             Date getDate = DateUtils.addDay(new Date(), -i);
             String date = DateUtils.formatDate(getDate);
-            videoReportDailyService.videoInfoList(date, date);
+
         }
     }
 

+ 6 - 9
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/MgsOrderLIstGetJob.java

@@ -90,8 +90,8 @@ public class MgsOrderLIstGetJob {
     /**
      * 昨日快分销数据获取
      **/
-    @XxlJob("yesterdayOrderGet")
-    public void yesterdayOrderGet() throws Exception {
+    @XxlJob("mgsYesterdayOrderGet")
+    public void mgsYesterdayOrderGet() throws Exception {
         List<JSONObject> cookies = mgsSupplyChainService.getCookie();
         if (Check.isNull(cookies)) {
             log.error("cookie数据为空");
@@ -128,8 +128,8 @@ public class MgsOrderLIstGetJob {
     /**
      * 当前小时数据获取
      **/
-    @XxlJob("nowHourOrderGet")
-    public void nowHourOrderGet() throws Exception {
+    @XxlJob("mgsNowHourOrderGet")
+    public void mgsNowHourOrderGet() throws Exception {
         List<JSONObject> cookies = mgsSupplyChainService.getCookie();
         if (Check.isNull(cookies)) {
             log.error("cookie数据为空");
@@ -168,15 +168,14 @@ public class MgsOrderLIstGetJob {
         }
     }
 
-
     /**
      * 当天所有数据获取
      **/
     /**
      * 当天数据获取
      **/
-    @XxlJob("frontHourOrderGet")
-    public void frontHourOrderGet() throws Exception {
+    @XxlJob("mgsFrontHourOrderGet")
+    public void mgsFrontHourOrderGet() throws Exception {
         List<JSONObject> cookies = mgsSupplyChainService.getCookie();
         if (Check.isNull(cookies)) {
             log.error("cookie数据为空");
@@ -210,8 +209,6 @@ public class MgsOrderLIstGetJob {
                 }
             }
         }
-
-
     }
 
 

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

@@ -112,6 +112,11 @@ public class settlementJob {
         ikuaishouSupplyChainService.cleanKuaiShouPromoterBindChannel(date);
         ikuaishouSupplyChainService.cleanBytedancePromoterBindChannel(date);
 
+
+
+        ikuaishouSupplyChainService.deleteMgsPromoterBindChannelByDate(date);
+        ikuaishouSupplyChainService.cleanMgsKuaiShouPromoterBindChannel(date);
+
     }
 
 

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

@@ -34,4 +34,8 @@ public interface KuaishouSupplyChainMapper extends BaseMapper<KuaishouSupplyChai
     List<JSONObject> getSamplesData(@Param("startDate") String startDate);
 
     void cleanBytedancePromoterBindChannel(@Param("date") Long date);
+
+    void deleteMgsPromoterBindChannelByDate(@Param("date") Long date);
+
+    void cleanMgsKuaiShouPromoterBindChannel(@Param("date") Long date);
 }

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

@@ -97,9 +97,26 @@
         group by t1.promoter_id
 
     </insert>
+    <insert id="cleanMgsKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
+        insert into miaogousi.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 miaogousi.kuaishou_promoter t1
+        left join miaogousi.sys_user_role t2
+        on t1.user_id = t2.user_id
+        left join miaogousi.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>
     <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

@@ -31,4 +31,8 @@ public interface IKuaishouSupplyChainService extends IService<KuaishouSupplyChai
     List<JSONObject> getSamplesData(String startDate);
 
     void cleanBytedancePromoterBindChannel(Long date);
+
+    void deleteMgsPromoterBindChannelByDate(Long date);
+
+    void cleanMgsKuaiShouPromoterBindChannel(Long date);
 }

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

@@ -228,6 +228,16 @@ public class KuaishouSupplyChainServiceImpl extends ServiceImpl<KuaishouSupplyCh
         supplyChainMapper.cleanBytedancePromoterBindChannel(date);
     }
 
+    @Override
+    public void deleteMgsPromoterBindChannelByDate(Long date) {
+        supplyChainMapper.deleteMgsPromoterBindChannelByDate(date);
+    }
+
+    @Override
+    public void cleanMgsKuaiShouPromoterBindChannel(Long date) {
+        supplyChainMapper.cleanMgsKuaiShouPromoterBindChannel(date);
+    }
+
     public static String filterSupplement(String content) {
         StringBuilder sb = new StringBuilder();
         for (char ch : content.toCharArray()) {