@@ -7,4 +7,6 @@ import java.util.List;
public interface AdqAdminAdvertiserListMapper {
void replaceAdqAccountList(@Param("adds") List<AdqAdvertiserList> addList);
+
+ void deleteAdvertiserListByAdminId(@Param("advertiserId") Long advertiserId);
}
@@ -26,4 +26,9 @@
on duplicate key update
advertiser_name= VALUES(advertiser_name)
</insert>
+ <delete id="deleteAdvertiserListByAdminId" parameterType="java.lang.Long">
+ DELETE
+ FROM deepthink.adq_advertiser_list
+ WHERE admin_advertiser_id = #{advertiserId}
+ </delete>
</mapper>
@@ -2,4 +2,6 @@ package cn.com.ctop.job.adq.data.service;
public interface IAdqAdminAdvertiserListService {
void getAdminAdvertiserList(Long advertiserId, String accessToken,Integer cursor);
+ void deleteAdvertiserListByAdminId(Long advertiserId);
@@ -85,4 +85,9 @@ public class AdqAdminAdvertiserListServiceImpl implements IAdqAdminAdvertiserLis
+ @Override
+ public void deleteAdvertiserListByAdminId(Long advertiserId) {
+ adminAdvertiserListMapper.deleteAdvertiserListByAdminId(advertiserId);
+ }
@@ -39,12 +39,11 @@ public class AdqAdminAdvertiserListJob {
adminExecutorService.submit(new Runnable() {
@Override
public void run() {
- adminAdvertiserListService.getAdminAdvertiserList(advertiserId, accessToken,null);
+ adminAdvertiserListService.deleteAdvertiserListByAdminId(advertiserId);
+ adminAdvertiserListService.getAdminAdvertiserList(advertiserId, accessToken, null);
});
-