|
@@ -56,6 +56,7 @@ import org.springframework.stereotype.Service;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@@ -1682,23 +1683,26 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
|
|
*/
|
|
*/
|
|
private List<AiKuaishouAccountAutoVideo> getVideosByParams(AiKuaishouAccountAutoStrategy strategy, String statDate, String appVersion, Integer videoType, String createType, Integer videoCnt) {
|
|
private List<AiKuaishouAccountAutoVideo> getVideosByParams(AiKuaishouAccountAutoStrategy strategy, String statDate, String appVersion, Integer videoType, String createType, Integer videoCnt) {
|
|
//素材关键词
|
|
//素材关键词
|
|
- String keyword = null;
|
|
|
|
|
|
+ List<String> keyword = new ArrayList<>();
|
|
if (Check.isNull(strategy.getMaterialKeyword()) && !Check.isNull(appVersion)) {
|
|
if (Check.isNull(strategy.getMaterialKeyword()) && !Check.isNull(appVersion)) {
|
|
String[] split = appVersion.split("-");
|
|
String[] split = appVersion.split("-");
|
|
if (split.length > 1) {
|
|
if (split.length > 1) {
|
|
- keyword = split[1];
|
|
|
|
|
|
+ keyword.add(split[1]);
|
|
} else {
|
|
} else {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- keyword = strategy.getMaterialKeyword();
|
|
|
|
|
|
+ String materialKeyword = strategy.getMaterialKeyword();
|
|
|
|
+ if(materialKeyword!=null&& materialKeyword.contains("-")){
|
|
|
|
+ keyword = Arrays.asList(materialKeyword.split("-"));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
Long accountId = strategy.getAccountId();
|
|
Long accountId = strategy.getAccountId();
|
|
Integer channelType = strategy.getChannelType();
|
|
Integer channelType = strategy.getChannelType();
|
|
if (videoType == 1) {
|
|
if (videoType == 1) {
|
|
//获取上新素材
|
|
//获取上新素材
|
|
- List<AiKuaishouAccountAutoVideo> upNewVideos = autoVideoService.getUpNewVideos(accountId, channelType, keyword, videoCnt, statDate, createType);
|
|
|
|
- if (!Check.isNull(appVersion)) {
|
|
|
|
|
|
+ return autoVideoService.getUpNewVideos(accountId, channelType, keyword, videoCnt, statDate, createType);
|
|
|
|
+ /*if (!Check.isNull(appVersion)) {
|
|
//多应用需要查询素材名包含“all"的素材
|
|
//多应用需要查询素材名包含“all"的素材
|
|
List<AiKuaishouAccountAutoVideo> videos = autoVideoService.getUpNewVideos(accountId, channelType, "all", videoCnt, statDate, createType);
|
|
List<AiKuaishouAccountAutoVideo> videos = autoVideoService.getUpNewVideos(accountId, channelType, "all", videoCnt, statDate, createType);
|
|
if (null == upNewVideos || upNewVideos.isEmpty()) {
|
|
if (null == upNewVideos || upNewVideos.isEmpty()) {
|
|
@@ -1711,7 +1715,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
return upNewVideos;
|
|
return upNewVideos;
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
} else if (videoType == 2) {
|
|
} else if (videoType == 2) {
|
|
//历史高质量
|
|
//历史高质量
|
|
return autoVideoService.getHistoryTopVideos(accountId, channelType, keyword, videoCnt, statDate, createType);
|
|
return autoVideoService.getHistoryTopVideos(accountId, channelType, keyword, videoCnt, statDate, createType);
|