|
@@ -377,11 +377,12 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
JSONObject creObj = new JSONObject();
|
|
JSONObject creObj = new JSONObject();
|
|
|
|
|
|
JSONArray titleArray = new JSONArray();
|
|
JSONArray titleArray = new JSONArray();
|
|
- List<BytedanceVideoSlogenInfo> slogenInfos = slogenInfoService.listByParams(videoInfo.getSignature(),1);
|
|
|
|
|
|
+ //根据账户 和 文案数量 查询 指定文案
|
|
|
|
+ List<BytedanceVideoSlogenInfo> slogenInfos = slogenInfoService.listByParams(videoInfo.getSignature(),1,strategy.getCopywritingNumber());
|
|
//使用指定文案
|
|
//使用指定文案
|
|
if(!Check.isNull(slogenInfos)){
|
|
if(!Check.isNull(slogenInfos)){
|
|
for (BytedanceVideoSlogenInfo slogenInfo:slogenInfos) {
|
|
for (BytedanceVideoSlogenInfo slogenInfo:slogenInfos) {
|
|
- if(titleArray.size() >= 10){ //接口中是要求一个视频最多10个标题
|
|
|
|
|
|
+ if(titleArray.size() >= strategy.getCopywritingNumber()){ //接口中是要求一个视频最多10个标题
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
JSONObject titleObject = new JSONObject();
|
|
JSONObject titleObject = new JSONObject();
|
|
@@ -407,7 +408,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
List<ByteDanceGeneralCopywriter> byteDanceGeneralCopywriter = byteDanceGeneralCopywriterMapper.getRandThree(strategy.getAccountId());
|
|
List<ByteDanceGeneralCopywriter> byteDanceGeneralCopywriter = byteDanceGeneralCopywriterMapper.getRandThree(strategy.getAccountId());
|
|
if(!Check.isNull(byteDanceGeneralCopywriter)){
|
|
if(!Check.isNull(byteDanceGeneralCopywriter)){
|
|
for(int i = 0; i < byteDanceGeneralCopywriter.size(); i++){
|
|
for(int i = 0; i < byteDanceGeneralCopywriter.size(); i++){
|
|
- if(titleArray.size() >= 10){
|
|
|
|
|
|
+ if(titleArray.size() >= strategy.getCopywritingNumber()){
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
JSONObject titleObject = new JSONObject();
|
|
JSONObject titleObject = new JSONObject();
|
|
@@ -433,7 +434,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
}
|
|
}
|
|
// 图片 使用通用文案 最多10条
|
|
// 图片 使用通用文案 最多10条
|
|
}else if ("image".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
}else if ("image".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
- List<ByteDanceGeneralCopywriter> byteDanceGeneralCopywriterList = byteDanceGeneralCopywriterMapper.getRandTen(strategy.getAccountId());
|
|
|
|
|
|
+ List<ByteDanceGeneralCopywriter> byteDanceGeneralCopywriterList = byteDanceGeneralCopywriterMapper.getRandTen(strategy.getAccountId(),strategy.getCopywritingNumber());
|
|
if(!Check.isNull(byteDanceGeneralCopywriterList)){
|
|
if(!Check.isNull(byteDanceGeneralCopywriterList)){
|
|
for (ByteDanceGeneralCopywriter byteDanceGeneralCopywriter : byteDanceGeneralCopywriterList){
|
|
for (ByteDanceGeneralCopywriter byteDanceGeneralCopywriter : byteDanceGeneralCopywriterList){
|
|
JSONObject titleObject = new JSONObject();
|
|
JSONObject titleObject = new JSONObject();
|