Pārlūkot izejas kodu

adq-增加账户自动关停任务

yumeng 11 mēneši atpakaļ
vecāks
revīzija
0e43d17cb3

+ 2 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/mapper/AdqAccountReportMapper.java

@@ -17,4 +17,6 @@ public interface AdqAccountReportMapper {
     void addAccountDailyListSD(@Param("adds") List<AdqAdvertiserReportDaily> dailyList);
 
     void updateAdqAccountStatus();
+
+    void updateClAccountStatus();
 }

+ 15 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/mapper/xml/AdqAccountReportMapper.xml

@@ -242,4 +242,19 @@
                                 where t.cost &lt;= 0)
           and media_type = 3
     </update>
+    <update id="updateClAccountStatus">
+        update deepthink.advertiser_bind_info
+        set advertiser_status = 1
+        where advertiser_id in (select advertiser_id
+                                from deepthink.advertiser_bind_info
+                                where advertiser_id in (select advertiser_id
+                                                        from media_api.chuangliang_advertiser_media_report_daliy t1
+                                                        where stat_datetime = date_format(now(), '%Y%m%d')
+                                                          and media_type = '腾讯广告3.0'
+                                                          and aggregate_cost > 0
+                                                        group by advertiser_id)
+                                  and media_type = 3
+                                  and advertiser_status = 2)
+          and media_type = 3
+    </update>
 </mapper>

+ 2 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/service/IAdqRetryReportService.java

@@ -10,4 +10,6 @@ public interface IAdqRetryReportService {
     void getAccountDailyRetry(Long id, Long advertiserId, String accessToken, String startDate, String endDate, Integer page,Integer isSend);
 
     void updateAdqAccountStatus();
+
+    void updateClAccountStatus();
 }

+ 5 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/data/service/impl/AdqRetryReportServiceImpl.java

@@ -319,4 +319,9 @@ public class AdqRetryReportServiceImpl implements IAdqRetryReportService {
         accountReportMapper.updateAdqAccountStatus();
     }
 
+    @Override
+    public void updateClAccountStatus() {
+        accountReportMapper.updateClAccountStatus();
+    }
+
 }

+ 5 - 0
job-adq/src/main/java/cn/com/ctop/job/adq/handler/AdqRetryReportJob.java

@@ -181,5 +181,10 @@ public class AdqRetryReportJob {
         retryReportService.updateAdqAccountStatus();
     }
 
+    @XxlJob("updateClAccountStatus")
+    public void updateClAccountStatus()  {
+        retryReportService.updateClAccountStatus();
+    }
+
 
 }