|
@@ -126,7 +126,13 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
return videoCnt;
|
|
|
}
|
|
|
log.info("获取{}素材个数:{}=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),videoInfos.size(),token.getAccountId());
|
|
|
-
|
|
|
+ AiBytedanceAutocreateLog iBytedanceAutocreateLogofVideoInfo = new AiBytedanceAutocreateLog(
|
|
|
+ token.getAccountId(),
|
|
|
+ "获取素材",
|
|
|
+ 200,
|
|
|
+ "获取"+BytedanceCreativeMatTypeEnum.getNameByType(createType+"")+"素材个数"+videoInfos.size(),
|
|
|
+ "");
|
|
|
+ iBytedanceAutocreateLogService.save(iBytedanceAutocreateLogofVideoInfo);
|
|
|
|
|
|
for (ByteDanceVideoInfo video:videoInfos) {
|
|
|
//判断此素材为视频
|
|
@@ -186,10 +192,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
log.info("广告计划删除失败:message==>{}",resultDeletePlan.getMessage());
|
|
|
AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
token.getAccountId(),
|
|
|
- "删除广告计划",
|
|
|
+ "广告计划删除失败",
|
|
|
resultDeletePlan.getCode(),
|
|
|
- "广告计划删除失败 => message:" + resultDeletePlan.getMessage(),
|
|
|
- "marketingService.updPlanStatus => token:"+ token.toString()+",adIds:"+adIds+",optstatus:delete");
|
|
|
+ resultDeletePlan.getMessage(),
|
|
|
+ "marketingService.updPlanStatus => token:"+ token.toString()+",adIds:"+adIds.toString()+",optstatus:delete");
|
|
|
iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
}
|
|
|
|
|
@@ -199,10 +205,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
log.info("账户id:{};创意创建失败:code==>{};message==>{}",strategy.getAccountId(),code,message);
|
|
|
AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
strategy.getAccountId(),
|
|
|
- "创建创意",
|
|
|
+ "创意创建失败",
|
|
|
code,
|
|
|
- "创意创建失败 => message:" + message,
|
|
|
- "marketingService.creativeCreate => token:"+ token.toString()+",adIds:"+adIds+",creativeParams:"+creativeParams.toJSONString());
|
|
|
+ message,
|
|
|
+ "marketingService.creativeCreate => token:"+ token.toString()+",adIds:"+adIds.toString()+",creativeParams:"+creativeParams.toJSONString());
|
|
|
iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
continue;
|
|
|
}
|
|
@@ -273,10 +279,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
log.info("广告计划删除失败:message==>{}",resultDeletePlan.getMessage());
|
|
|
AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
token.getAccountId(),
|
|
|
- "删除广告计划",
|
|
|
+ "广告计划删除失败",
|
|
|
resultDeletePlan.getCode(),
|
|
|
- "广告计划删除失败 => message:" + resultDeletePlan.getMessage(),
|
|
|
- "marketingService.updPlanStatus => token:"+ token.toString()+",adIds:"+adIds+",optstatus:delete");
|
|
|
+ resultDeletePlan.getMessage(),
|
|
|
+ "marketingService.updPlanStatus => token:"+ token.toString()+",adIds:"+adIds.toString()+",optstatus:delete");
|
|
|
iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
}
|
|
|
String message = creativeObject.getString("message");
|
|
@@ -285,10 +291,10 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
log.info("账户id:{};创意创建失败:code==>{};message==>{}",strategy.getAccountId(),code,message);
|
|
|
AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
strategy.getAccountId(),
|
|
|
- "创建创意",
|
|
|
+ "创意创建失败",
|
|
|
code,
|
|
|
- "创意创建失败 => message:" + message,
|
|
|
- "marketingService.creativeCreate => token:"+ token.toString()+",adIds:"+adIds+",creativeParams:"+creativeParams.toJSONString());
|
|
|
+ message,
|
|
|
+ "marketingService.creativeCreate => token:"+ token.toString()+",adIds:"+adIds.toString()+",creativeParams:"+creativeParams.toJSONString());
|
|
|
iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
continue;
|
|
|
}
|
|
@@ -588,7 +594,13 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
Result result = marketingService.createAdvertiserPlan(token,adParams,strategy);
|
|
|
System.out.println(result);
|
|
|
if(result.getCode()!=0){
|
|
|
- //TODO 计划创建异常 后续需要加日志
|
|
|
+ AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
+ strategy.getAccountId(),
|
|
|
+ "计划创建异常",
|
|
|
+ result.getCode(),
|
|
|
+ result.getMessage(),
|
|
|
+ adParams.toJSONString());
|
|
|
+ iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
return null;
|
|
|
}
|
|
|
return (Long)result.getResult();
|
|
@@ -1066,7 +1078,13 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
//创建组
|
|
|
Result campaignData = marketingService.createCampaign(token, campaignParam);
|
|
|
if(campaignData.getCode()!=0){
|
|
|
- //TODO 组创建异常 后续需要加日志
|
|
|
+ AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
+ strategy.getAccountId(),
|
|
|
+ "组创建异常",
|
|
|
+ campaignData.getCode(),
|
|
|
+ campaignData.getMessage(),
|
|
|
+ campaignParam.toJSONString());
|
|
|
+ iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
return null;
|
|
|
}
|
|
|
return (Long)campaignData.getResult();
|
|
@@ -1577,6 +1595,14 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
log.info("{}计划创建不足,剩余需要创建个数{},使用历史打捞素材创建", strategy.getAccountId(), remindCnt);
|
|
|
this.createCreative(strategy, 4, remindCnt,openUrl);
|
|
|
}
|
|
|
+ int newUnitCreateCnt = planService.queryToDayBuiltCount(strategy.getAccountId());
|
|
|
+ AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
+ strategy.getAccountId(),
|
|
|
+ "创建广告计划",
|
|
|
+ 200,
|
|
|
+ "当前账户需要创建计划总数为"+unitNum+"个,截止目前有"+unitCreateCnt+"个,此次创建成功"+(newUnitCreateCnt - unitCreateCnt)+"个。",
|
|
|
+ "aiBytedanceAdvertiserStrategyService.customCreativeSupplement => strategy:"+ strategy.toString()+",hour:"+hour);
|
|
|
+ iBytedanceAutocreateLogService.save(iBytedanceAutocreateLog);
|
|
|
}catch (Exception e){
|
|
|
log.info(e.getMessage());
|
|
|
}
|