|
@@ -395,17 +395,18 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
titleArray.add(titleObject);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// 视频 指定文案不够的时候 使用通用文案 最多3条
|
|
|
if ("video".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
|
- for(int i = 0; i < 3; i++){
|
|
|
- if(titleArray.size() >= 10){
|
|
|
- break;
|
|
|
- }
|
|
|
- ByteDanceGeneralCopywriter byteDanceGeneralCopywriter = byteDanceGeneralCopywriterMapper.getRandOne(strategy.getAccountId());
|
|
|
- if(!Check.isNull(byteDanceGeneralCopywriter)){
|
|
|
+ List<ByteDanceGeneralCopywriter> byteDanceGeneralCopywriter = byteDanceGeneralCopywriterMapper.getRandThree(strategy.getAccountId());
|
|
|
+ if(!Check.isNull(byteDanceGeneralCopywriter)){
|
|
|
+ for(int i = 0; i < byteDanceGeneralCopywriter.size(); i++){
|
|
|
+ if(titleArray.size() >= 10){
|
|
|
+ break;
|
|
|
+ }
|
|
|
JSONObject titleObject = new JSONObject();
|
|
|
- titleObject.put("title",byteDanceGeneralCopywriter.getTextCopywriter());
|
|
|
- String creativeWordsIds = byteDanceGeneralCopywriter.getCreativeWordIds();
|
|
|
+ titleObject.put("title",byteDanceGeneralCopywriter.get(i).getTextCopywriter());
|
|
|
+ String creativeWordsIds = byteDanceGeneralCopywriter.get(i).getCreativeWordIds();
|
|
|
if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
|
|
|
JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
|
|
|
if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
|