|
@@ -125,8 +125,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
List<String> ghIds = accountList.stream().map(ContentPlatformGzhAccount::getGhId).collect(Collectors.toList());
|
|
|
List<CgiReplyBucketData> bucketDataList = cgiReplyService.getCgiReplyBucketDataListByGhIds(ghIds, "manual");
|
|
|
Map<String, Map<Long, CgiReplyBucketData>> bucketDataMap = bucketDataList.stream()
|
|
|
- .collect(Collectors.groupingBy(CgiReplyBucketData::getGhId,
|
|
|
- Collectors.toMap(CgiReplyBucketData::getMiniVideoId, Function.identity())));
|
|
|
+ .collect(Collectors.groupingBy(CgiReplyBucketData::getGhId,
|
|
|
+ Collectors.toMap(CgiReplyBucketData::getMiniVideoId, Function.identity())));
|
|
|
List<GzhPlanItemVO> result = new ArrayList<>();
|
|
|
for (ContentPlatformGzhPlan gzhPlan : planList) {
|
|
|
GzhPlanItemVO planItemVO = new GzhPlanItemVO();
|
|
@@ -609,7 +609,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
List<String> ghIds = ghDetailList.stream().map(GhDetail::getGhId).collect(Collectors.toList());
|
|
|
List<ContentPlatformGzhAccount> gzhAccountList = cooperateAccountService.getCooperateAccountListByGhIds(account.getId(), ghIds);
|
|
|
List<ContentPlatformGzhPlan> existsPlanList = getGzhPlanListByCreateAccountId(account.getId());
|
|
|
- List<Long> existsAccountIds = existsPlanList.stream().map(ContentPlatformGzhPlan::getAccountId).collect(Collectors.toList());
|
|
|
+ List<Long> existsAccountIds = existsPlanList.stream().map(ContentPlatformGzhPlan::getAccountId).distinct().collect(Collectors.toList());
|
|
|
Map<String, ContentPlatformGzhAccount> gzhAccountMap = gzhAccountList.stream()
|
|
|
.collect(Collectors.toMap(ContentPlatformGzhAccount::getGhId, Function.identity()));
|
|
|
for (GhDetail ghDetail : ghDetailList) {
|
|
@@ -624,11 +624,13 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
gzhPlan.setSelectVideoType(ghDetail.getStrategyStatus());
|
|
|
gzhPlan.setPublishStage(PublishStageEnum.USER.getVal());
|
|
|
if (StringUtils.hasText(gzhAccount.getExternalId())) {
|
|
|
- aigcApiService.closeAccountMessagePublishPlan(gzhAccount.getExternalId());
|
|
|
- gzhPlan.setPublishStage(PublishStageEnum.PLATFORM.getVal());
|
|
|
- String externalId = aigcApiService.createPublishPlan(gzhAccount.getExternalId(), gzhAccount.getName(), account.getChannel());
|
|
|
- gzhPlan.setExternalId(externalId);
|
|
|
- gzhPlan.setStagePublishStatus(1);
|
|
|
+ if (aigcApiService.checkContainMessagePlan(gzhAccount.getExternalId())) {
|
|
|
+ aigcApiService.closeAccountMessagePublishPlan(gzhAccount.getExternalId());
|
|
|
+ gzhPlan.setPublishStage(PublishStageEnum.PLATFORM.getVal());
|
|
|
+ String externalId = aigcApiService.createPublishPlan(gzhAccount.getExternalId(), gzhAccount.getName(), account.getChannel());
|
|
|
+ gzhPlan.setExternalId(externalId);
|
|
|
+ gzhPlan.setStagePublishStatus(1);
|
|
|
+ }
|
|
|
}
|
|
|
gzhPlan.setCreateAccountId(account.getId());
|
|
|
gzhPlan.setCreateTimestamp(now);
|