|
@@ -3,6 +3,7 @@ package com.tzld.piaoquan.api.service.contentplatform.impl;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
|
|
|
+import com.tzld.piaoquan.api.common.enums.contentplatform.ContentPlatformGzhPlanTypeEnum;
|
|
|
import com.tzld.piaoquan.api.common.enums.contentplatform.PublishStageEnum;
|
|
|
import com.tzld.piaoquan.api.common.enums.contentplatform.QwPlanTypeEnum;
|
|
|
import com.tzld.piaoquan.api.common.exception.CommonException;
|
|
@@ -156,9 +157,11 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
videoItemVO.setCustomCover(video.getCustomCover());
|
|
|
videoItemVO.setCustomCoverType(video.getCustomCoverType());
|
|
|
videoItemVO.setVideo(video.getVideo());
|
|
|
- CgiReplyBucketData bucketData = bucketDataMapByGhId.get(video.getVideoId());
|
|
|
- if (Objects.nonNull(bucketData)) {
|
|
|
- videoItemVO.setPageUrl(bucketData.getMiniPagePath());
|
|
|
+ if (Objects.nonNull(bucketDataMapByGhId)) {
|
|
|
+ CgiReplyBucketData bucketData = bucketDataMapByGhId.get(video.getVideoId());
|
|
|
+ if (Objects.nonNull(bucketData)) {
|
|
|
+ videoItemVO.setPageUrl(bucketData.getMiniPagePath());
|
|
|
+ }
|
|
|
}
|
|
|
videoVOList.add(videoItemVO);
|
|
|
}
|
|
@@ -574,6 +577,22 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
return qwPlanVideoMapper.selectByExample(example);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String getGzhChannel(String ghId) {
|
|
|
+ ContentPlatformGzhAccount gzhAccount = cooperateAccountService.getGzhAccount(ghId);
|
|
|
+ if (Objects.nonNull(gzhAccount)) {
|
|
|
+ ContentPlatformAccount account = accountService.getAccountById(gzhAccount.getCreateAccountId());
|
|
|
+ ContentPlatformGzhPlanExample example = new ContentPlatformGzhPlanExample();
|
|
|
+ example.createCriteria().andCreateAccountIdEqualTo(account.getId()).andAccountIdEqualTo(gzhAccount.getId())
|
|
|
+ .andStatusEqualTo(1).andTypeEqualTo(ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal());
|
|
|
+ List<ContentPlatformGzhPlan> list = gzhPlanMapper.selectByExample(example);
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) {
|
|
|
+ return account.getChannel();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void gzhPlanImport(List<String> channels) {
|
|
|
List<ContentPlatformAccount> accountList = accountService.getAccountListByChannels(channels);
|
|
@@ -599,9 +618,9 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
continue;
|
|
|
}
|
|
|
gzhPlan.setAccountId(gzhAccount.getId());
|
|
|
- gzhPlan.setType(0);
|
|
|
+ gzhPlan.setType(ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal());
|
|
|
gzhPlan.setScene(0);
|
|
|
- gzhPlan.setSelectVideoType(1);
|
|
|
+ gzhPlan.setSelectVideoType(ghDetail.getStrategyStatus());
|
|
|
gzhPlan.setPublishStage(PublishStageEnum.USER.getVal());
|
|
|
if (StringUtils.hasText(gzhAccount.getExternalId())) {
|
|
|
aigcApiService.closeAccountMessagePublishPlan(gzhAccount.getExternalId());
|
|
@@ -636,6 +655,21 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void fwhPlanImport(List<String> channels) {
|
|
|
+ List<ContentPlatformAccount> accountList = accountService.getAccountListByChannels(channels);
|
|
|
+ for (ContentPlatformAccount account : accountList) {
|
|
|
+ Long now = System.currentTimeMillis();
|
|
|
+ List<ContentPlatformGzhAccount> gzhAccountList = cooperateAccountService.getAccountListByCreatorId(account.getId());
|
|
|
+ for (ContentPlatformGzhAccount gzhAccount : gzhAccountList) {
|
|
|
+ if (!StringUtils.hasText(gzhAccount.getExternalId())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void qwPlanImport(List<String> channels) {
|
|
|
List<AdPutFlowRecordTencent> list = new ArrayList<>();
|