Pārlūkot izejas kodu

优化审核建议下拉时添加账户id和计划id,自动投放日志到表位置修正,新增自动创建完毕后立马获取最新这个账户的计划数据

huangxuechao 4 gadi atpakaļ
vecāks
revīzija
a16d54a20a
12 mainītis faili ar 115 papildinājumiem un 53 dzēšanām
  1. 6 4
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/BytedanceMaterialRejectReason.java
  2. 2 0
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/BytedancePlanRejectReason.java
  3. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/BytedanceMaterialRejectReasonMapper.java
  4. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/BytedancePlanRejectReasonMapper.java
  5. 1 3
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/BytedanceMaterialRejectReasonMapper.xml
  6. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/BytedancePlanRejectReasonMapper.xml
  7. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/BytedanceRejectReasonService.java
  8. 2 2
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IAiBytedanceAdvertiserStrategyService.java
  9. 37 17
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java
  10. 1 1
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/ByteDanceAdvertisePlanServiceImpl.java
  11. 58 13
      jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/BytedanceRejectReasonServiceImpl.java
  12. 4 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/bytedance/advertise/controller/BytedanceRejectReasonController.java

+ 6 - 4
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/BytedanceMaterialRejectReason.java

@@ -1,5 +1,7 @@
 package org.jeecg.modules.bytedance.advertise.entity;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 
@@ -7,19 +9,19 @@ import java.util.Date;
 @Data
 @TableName("ctop_bytedance_material_reject_reason")
 public class BytedanceMaterialRejectReason {
-    private Long id;
-
     private String videoId;
 
     private String imageId;
 
     private String title;
 
-    private Integer materialType;
-
     private String rejectReason;
 
     private Integer isLowQuality;
 
     private Date createTime;
+
+    private Long accountId;
+
+    private Long adId;
 }

+ 2 - 0
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/BytedancePlanRejectReason.java

@@ -17,4 +17,6 @@ public class BytedancePlanRejectReason {
 
     private Date createTime;
 
+    private Long accountId;
+
 }

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/BytedanceMaterialRejectReasonMapper.java

@@ -11,7 +11,7 @@ import org.jeecg.modules.bytedance.advertise.entity.BytedanceMaterialRejectReaso
  * @version V1.0
  */
 public interface BytedanceMaterialRejectReasonMapper extends BaseMapper<BytedanceMaterialRejectReason> {
-    void replaceIntoDb(BytedanceMaterialRejectReason bytedanceMaterialRejectReason);
+    int replaceIntoDb(BytedanceMaterialRejectReason bytedanceMaterialRejectReason);
 
     Integer getIsLowQualityByVideoId(String video);
 }

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/BytedancePlanRejectReasonMapper.java

@@ -10,5 +10,5 @@ import org.jeecg.modules.bytedance.advertise.entity.BytedancePlanRejectReason;
  * @version V1.0
  */
 public interface BytedancePlanRejectReasonMapper extends BaseMapper<BytedancePlanRejectReason> {
-    void replaceIntoDb(BytedancePlanRejectReason bytedancePlanRejectReason);
+    int replaceIntoDb(BytedancePlanRejectReason bytedancePlanRejectReason);
 }

+ 1 - 3
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/BytedanceMaterialRejectReasonMapper.xml

@@ -2,12 +2,10 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.bytedance.advertise.mapper.BytedanceMaterialRejectReasonMapper">
 <insert id="replaceIntoDb" parameterType="org.jeecg.modules.bytedance.advertise.entity.BytedanceMaterialRejectReason">
-
-    insert into ctop_bytedance_material_reject_reason (material_type,reject_reason,image_id,video_id,title,is_low_quality) values (#{materialType},#{rejectReason},#{imageId},#{videoId},#{title},#{isLowQuality})
+    replace into ctop_bytedance_material_reject_reason (reject_reason,image_id,video_id,title,is_low_quality,account_id,ad_id) values (#{rejectReason},#{imageId},#{videoId},#{title},#{isLowQuality},#{accountId},#{adId})
 </insert>
 
     <select id="getIsLowQualityByVideoId" resultType="integer">
-
         select distinct is_low_quality from ctop_bytedance_material_reject_reason where video_id = #{videoId} limit 1
     </select>
 

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/mapper/xml/BytedancePlanRejectReasonMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="org.jeecg.modules.bytedance.advertise.mapper.BytedancePlanRejectReasonMapper">
 
 <insert id="replaceIntoDb" parameterType="org.jeecg.modules.bytedance.advertise.entity.BytedancePlanRejectReason">
-    replace into ctop_bytedance_plan_reject_reason (ad_id,reject_item,reject_reason,is_low_quality) values (#{adId},#{rejectItem},#{rejectReason},#{isLowQuality})
+    replace into ctop_bytedance_plan_reject_reason (ad_id,reject_item,reject_reason,is_low_quality,account_id) values (#{adId},#{rejectItem},#{rejectReason},#{isLowQuality},#{accountId})
 
 </insert>
 </mapper>

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/BytedanceRejectReasonService.java

@@ -15,5 +15,5 @@ import java.util.List;
  */
 public interface BytedanceRejectReasonService {
 
-     void saveRejectReasonToDb(JSONArray jsonArray);
+     void saveRejectReasonToDb(JSONArray jsonArray,Long accountId);
 }

+ 2 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/IAiBytedanceAdvertiserStrategyService.java

@@ -28,7 +28,7 @@ public interface IAiBytedanceAdvertiserStrategyService extends IService<AiByteda
     Result updateADCreative(AiBytedanceAdvertiserStrategy strategy,String groupModifyTime,String planModifyTime);
 
 
-    Long createCreative(AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl);
+    Long createCreative(CtopOauthToken token, AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl);
 
     /**
      * 头条 - 配置信息 修改 状态
@@ -96,7 +96,7 @@ public interface IAiBytedanceAdvertiserStrategyService extends IService<AiByteda
 
     List<AiBytedanceAdvertiserStrategy> getByAccountId(Long accountId,Integer status);
 
-    void customCreativeSupplement(AiBytedanceAdvertiserStrategy strategy, Integer hour,String openUrl);
+    void customCreativeSupplement( AiBytedanceAdvertiserStrategy strategy, Integer hour,String openUrl);
 
     Result getAdActionText(String accountId,String landingType,String advancedCreativeType) throws Exception;
 

+ 37 - 17
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -78,20 +78,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
     BytedanceMaterialRejectReasonMapper bytedanceMaterialRejectReasonMapper;
     @Autowired
     IAiBytedanceAutocreateLogService iBytedanceAutocreateLogService;
+
     @Override
-    public Long createCreative(AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl) {
-        CtopOauthToken token = tokenService.getOauthTokenByAccountId(strategy.getAccountId()+"");
-        if (null == token) {
-            log.info("token获取失败=>accountId:{}", strategy.getAccountId());
-            AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
-                    strategy.getAccountId(),
-                    "获取token",
-                    500,
-                    "token获取失败=>accountId:" + strategy.getAccountId(),
-                    "tokenService.getOauthTokenByAccountId => "+ strategy.getAccountId());
-            iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
-            return videoCnt;
-        }
+    public Long createCreative(CtopOauthToken token, AiBytedanceAdvertiserStrategy strategy, Integer createType, Long videoCnt, String openUrl) {
+
 
         UserAllocation userAllocation = userAllocationService.getByAccountId(strategy.getAccountId());
         if(null == userAllocation||userAllocation.getAccountStatus()!=0){
@@ -246,6 +236,14 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 // 已使用dp链接 < 账户配置结束下标 || 已使用dp链接 > 结束下标
                 if( dpIndex < strategy.getDpLinkStartIndex() || dpIndex > strategy.getDpLinkEndIndex()){
                     log.info("此账户策略创建结束===已创建dp链接超过了限制===>账户id:{};策略id:{}", token.getAccountId(),strategy.getId());
+                    AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
+                            token.getAccountId(),
+                            "策略创建结束",
+                            500,
+                            "已创建dp链接超过了限制",
+                            "token:"+ token.toString()+",策略id:"+strategy.getId()+
+                                    dpIndex+"<" + strategy.getDpLinkStartIndex() +"||" +dpIndex +">" + strategy.getDpLinkEndIndex());
+                    iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
                     return 0L;
                 }
                 //组名称
@@ -308,6 +306,9 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
                 adDplinkInfoService.save(adDplinkInfo);
                 BytedanceAiVideoCreativeLog creativeLog = new BytedanceAiVideoCreativeLog(strategy,adId,campaignId,video);
                 videoCreativeLogService.saveOrUpdate(creativeLog);
+
+
+
                 videoCnt --;
                 if(videoCnt<=0){
                     return 0L;
@@ -1553,9 +1554,24 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
 
     @Autowired
     private IByteDanceAdvertisePlanService planService;
+    @Autowired
+    private IByteDanceAdvertiserDataService advertiserDataService;
+
     @Override
     public void customCreativeSupplement(AiBytedanceAdvertiserStrategy strategy, Integer hour,String openUrl) {
         try{
+            CtopOauthToken token = tokenService.getOauthTokenByAccountId(strategy.getAccountId()+"");
+            if (null == token) {
+                log.info("token获取失败=>accountId:{}", strategy.getAccountId());
+                AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
+                        strategy.getAccountId(),
+                        "获取token",
+                        500,
+                        "token获取失败=>accountId:" + strategy.getAccountId(),
+                        "tokenService.getOauthTokenByAccountId => "+ strategy.getAccountId());
+                iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
+                return;
+            }
             Long customUnitCnt = strategy.getCampaignAdCnt()*strategy.getCampaignCnt();
             Long unitNum = customUnitCnt * hour / 19;
             log.info("{}当前时间内需要创建计划总数:{}", strategy.getAccountId(), unitNum);
@@ -1566,23 +1582,27 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
             if (remindCnt >= 1) {
                 log.info("{}计划创建不足,剩余需要创建个数{},使用上新素材创建", strategy.getAccountId(), remindCnt);
                 //优先创建历史遗漏素材
-                remindCnt = this.createCreative(strategy, 1, remindCnt,openUrl);
+                remindCnt = this.createCreative(token, strategy, 1, remindCnt,openUrl);
             }
             if (remindCnt >= 1) {
                 log.info("{}计划创建不足,剩余需要创建个数{},使用历史遗漏素材创建", strategy.getAccountId(), remindCnt);
                 //优先创建历史遗漏素材
-                remindCnt = this.createCreative(strategy, 3, remindCnt,openUrl);
+                remindCnt = this.createCreative(token, strategy, 3, remindCnt,openUrl);
             }
             if (remindCnt >= 1) {
                 log.info("{}计划创建不足,剩余需要创建个数{},使用高质量素材创建", strategy.getAccountId(), remindCnt);
                 //高质量素材
-                remindCnt = this.createCreative(strategy, 2, remindCnt,openUrl);
+                remindCnt = this.createCreative(token, strategy, 2, remindCnt,openUrl);
             }
             if (remindCnt >= 1) {
                 //历史打捞素材
                 log.info("{}计划创建不足,剩余需要创建个数{},使用历史打捞素材创建", strategy.getAccountId(), remindCnt);
-                this.createCreative(strategy, 4, remindCnt,openUrl);
+                this.createCreative(token, strategy, 4, remindCnt,openUrl);
             }
+            //获取最新的plan计划更新到表格
+            String nowDate = DateUtils.formatDate();
+            advertiserDataService.getAdvertiserPlan(token, "", nowDate, nowDate);
+
             int newUnitCreateCnt = planService.queryToDayBuiltCount(strategy.getAccountId());
             AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
                     strategy.getAccountId(),

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/ByteDanceAdvertisePlanServiceImpl.java

@@ -217,7 +217,7 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
             queryWrapper.ge("ad_modify_time",adModifyTime);
             queryWrapper.le("ad_modify_time",new Date());
         }
-        queryWrapper.ne("opt_status","AD_STATUS_DELETE");
+        queryWrapper.ne("toutiao_status","AD_STATUS_DELETE");
 //        queryWrapper.eq("toutiao_status","AD_STATUS_AUDIT_DENY");   //获取通过审核建议
         queryWrapper.orderByDesc("ad_modify_time");
         return this.list(queryWrapper);

+ 58 - 13
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/BytedanceRejectReasonServiceImpl.java

@@ -21,6 +21,7 @@ import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.CancellationException;
 
 /**
  * 规则账户清洗数据
@@ -40,7 +41,7 @@ public class BytedanceRejectReasonServiceImpl implements BytedanceRejectReasonSe
 
     @Resource
     LowQualityRejectReasonMapper lowQualityRejectReasonMapper;
-    public void saveRejectReasonToDb(JSONArray jsonArray){
+    public void saveRejectReasonToDb(JSONArray jsonArray,Long accountId){
         for(int i=0; i<jsonArray.size(); i++){
             JSONObject jsonObject = jsonArray.getJSONObject(i);
             JSONObject ad_reject = jsonObject.getJSONObject("ad_reject");
@@ -53,11 +54,26 @@ public class BytedanceRejectReasonServiceImpl implements BytedanceRejectReasonSe
                     bytedancePlanRejectReason.setRejectItem(object.getString("reject_item"));
                     bytedancePlanRejectReason.setRejectReason(object.getString("reject_reason"));
                     bytedancePlanRejectReason.setIsLowQuality(0);
-                    LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason(bytedancePlanRejectReason.getRejectReason().trim());
-                    if(!Check.isNull(lowQualityRejectReason)){
-                        bytedancePlanRejectReason.setIsLowQuality(1);
+                    bytedancePlanRejectReason.setAccountId(accountId);
+                    String[] rejectReasons = bytedancePlanRejectReason.getRejectReason().split("广告体验优化建议:");
+                    if(rejectReasons.length == 0){
+                        LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason(bytedancePlanRejectReason.getRejectReason().trim());
+                        if(!Check.isNull(lowQualityRejectReason)){
+                            bytedancePlanRejectReason.setIsLowQuality(1);
+                        }
+                    }else {
+                        for(int k=1;k<rejectReasons.length;k++){
+                            LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason("广告体验优化建议:"+rejectReasons[k].trim());
+                            if(!Check.isNull(lowQualityRejectReason)){
+                                bytedancePlanRejectReason.setIsLowQuality(1);
+                            }
+                        }
+                    }
+
+                    int res = bytedancePlanRejectReasonMapper.replaceIntoDb(bytedancePlanRejectReason);
+                    if(res == 0){
+                        System.out.println(bytedancePlanRejectReason.toString());
                     }
-                    bytedancePlanRejectReasonMapper.replaceIntoDb(bytedancePlanRejectReason);
                 }
             }
 
@@ -66,17 +82,46 @@ public class BytedanceRejectReasonServiceImpl implements BytedanceRejectReasonSe
                 for(int j=0; j<material_reject.size();j++){
                     JSONObject object = material_reject.getJSONObject(j);
                     BytedanceMaterialRejectReason bytedanceMaterialRejectReason = new BytedanceMaterialRejectReason();
-                    bytedanceMaterialRejectReason.setMaterialType(object.getInteger("material_type"));
                     bytedanceMaterialRejectReason.setRejectReason(object.getString("reject_reason"));
                     bytedanceMaterialRejectReason.setIsLowQuality(0);
-                    LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason(bytedanceMaterialRejectReason.getRejectReason().trim());
-                    if(!Check.isNull(lowQualityRejectReason)){
-                        bytedanceMaterialRejectReason.setIsLowQuality(1);
+                    bytedanceMaterialRejectReason.setAccountId(accountId);
+                    String[] rejectReasons = bytedanceMaterialRejectReason.getRejectReason().split("广告体验优化建议:");
+                    for(int k=1;k<rejectReasons.length;k++){
+                        LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason("广告体验优化建议:"+rejectReasons[k].trim());
+                        if(!Check.isNull(lowQualityRejectReason)){
+                            bytedanceMaterialRejectReason.setIsLowQuality(1);
+                        }
+                    }
+                    if(rejectReasons.length == 0){
+                        LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason(bytedanceMaterialRejectReason.getRejectReason().trim());
+                        if(!Check.isNull(lowQualityRejectReason)){
+                            bytedanceMaterialRejectReason.setIsLowQuality(1);
+                        }
+                    }else {
+                        for(int k=1;k<rejectReasons.length;k++){
+                            LowQualityRejectReason lowQualityRejectReason = lowQualityRejectReasonMapper.getByRejectReason("广告体验优化建议:"+rejectReasons[k].trim());
+                            if(!Check.isNull(lowQualityRejectReason)){
+                                bytedanceMaterialRejectReason.setIsLowQuality(1);
+                            }
+                        }
+                    }
+                    if(!Check.isNull(object.getString("title"))){
+                        bytedanceMaterialRejectReason.setTitle(object.getString("title"));
+                    }
+                    if(!Check.isNull(object.getJSONArray("image_id"))){
+                        bytedanceMaterialRejectReason.setImageId(object.getJSONArray("image_id").toJSONString());
+                    }
+                    if(!Check.isNull(object.getString("video_id"))){
+                        bytedanceMaterialRejectReason.setVideoId(object.getString("video_id"));
+                    }
+                    if(!Check.isNull(ad_reject.getLong("ad_id"))){
+                        bytedanceMaterialRejectReason.setAdId(ad_reject.getLong("ad_id"));
+                    }
+                    int res =  BytedanceMaterialRejectReasonMapper.replaceIntoDb(bytedanceMaterialRejectReason);
+                    if(res == 0){
+                        System.out.println(bytedanceMaterialRejectReason.toString());
                     }
-                    bytedanceMaterialRejectReason.setTitle(object.getString("title"));
-                    bytedanceMaterialRejectReason.setImageId(object.getJSONArray("image_id").toJSONString());
-                    bytedanceMaterialRejectReason.setVideoId(object.getString("video_id"));
-                    BytedanceMaterialRejectReasonMapper.replaceIntoDb(bytedanceMaterialRejectReason);
+//                    BytedanceMaterialRejectReasonMapper.insert(bytedanceMaterialRejectReason);
                 }
             }
         }

+ 4 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/bytedance/advertise/controller/BytedanceRejectReasonController.java

@@ -65,7 +65,6 @@ public class BytedanceRejectReasonController {
 
         tokens.forEach(token -> executorService.submit(()->getRejectReasonByToken(token, hour)));
 
-        System.out.println("---------------------------------->>执行完毕<<----------------------------------");
 
         return result.success("调用任务已开启");
     }
@@ -74,17 +73,15 @@ public class BytedanceRejectReasonController {
     public void getRejectReasonByToken(CtopOauthToken token, Integer hour){
 
             if(token.getAccessTokenExpiresIn().before(new Date())){
+                log.info("token已过期,accountId ==> {}",token.getAccountId());
                 return;
             }
 
-//            System.out.println("token没过期+     " +token.getAccountId() );
-
             List<ByteDanceAdvertisePlan> allPlansByAccountId = byteDanceAdvertisePlanService.getAllPlansByAccountId(token.getAccountId(), Check.isNull(hour)?null:DateUtils.formatDate(DateUtils.addHour(new Date(),-hour),"yyyy-MM-dd HH:mm:ss"));
 
-            if(allPlansByAccountId.size() < 1){
+            if(Check.isNull(allPlansByAccountId) || allPlansByAccountId.size() < 1){
                 return;
             }
-            System.out.print(allPlansByAccountId.size()+"+");
             List<String> adids = new ArrayList<>();
             allPlansByAccountId.forEach(plan -> adids.add(plan.getId().toString()));
 
@@ -100,8 +97,7 @@ public class BytedanceRejectReasonController {
                     continue;
                 }
                 JSONArray jsonArray = JSONArray.parseArray(dataListResult.getResult().toString());
-//                System.out.println(jsonArray.toJSONString());
-                bytedanceRejectReasonService.saveRejectReasonToDb(jsonArray);
+                bytedanceRejectReasonService.saveRejectReasonToDb(jsonArray,token.getAccountId());
                 adids.removeAll(mulAdids);
             }
             Result dataListResult = marketingService.getRejectReason(token, token.getAccountId().toString(), adids);
@@ -109,8 +105,7 @@ public class BytedanceRejectReasonController {
                 return;
             }
             JSONArray jsonArray = JSONArray.parseArray(dataListResult.getResult().toString());
-//            System.out.println(jsonArray.toJSONString());
-            bytedanceRejectReasonService.saveRejectReasonToDb(jsonArray);
+            bytedanceRejectReasonService.saveRejectReasonToDb(jsonArray,token.getAccountId());
         }
 
 }