|
@@ -3,6 +3,7 @@ package com.tzld.longarticle.recommend.server.service.recommend;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.aigc.PublishContentStatusEnum;
|
|
|
import com.tzld.longarticle.recommend.server.common.enums.longArticle.ArticleVideoAuditStatusEnum;
|
|
|
+import com.tzld.longarticle.recommend.server.mapper.aigc.AigcBaseMapper;
|
|
|
import com.tzld.longarticle.recommend.server.mapper.aigc.PublishContentMapper;
|
|
|
import com.tzld.longarticle.recommend.server.mapper.longArticle.ArticleAuditMapper;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.PublishContentMiniprogramDTO;
|
|
@@ -29,6 +30,8 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
|
public class ArticleVideoAuditService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AigcBaseMapper aigcBaseMapper;
|
|
|
@Autowired
|
|
|
private ArticleAuditMapper articleAuditMapper;
|
|
|
@Autowired
|
|
@@ -57,9 +60,10 @@ public class ArticleVideoAuditService {
|
|
|
public Page<ArticleVideoAuditListVO> list(ArticleVideoAuditListParam param) {
|
|
|
int offset = (param.getPageNum() - 1) * param.getPageSize();
|
|
|
int count = articleAuditMapper.articleVideoAuditListCount(param.getContentId(), param.getStatus(),
|
|
|
- param.getTitle(), param.getAuditAccount());
|
|
|
+ param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan());
|
|
|
List<ArticleVideoAuditListVO> list = articleAuditMapper.articleVideoAuditList(param.getContentId(),
|
|
|
- param.getStatus(), param.getTitle(), param.getAuditAccount(), offset, param.getPageSize(), poolLevelDesc);
|
|
|
+ param.getStatus(), param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan()
|
|
|
+ , offset, param.getPageSize(), poolLevelDesc);
|
|
|
buildArticleVideoAuditListVO(list);
|
|
|
Page<ArticleVideoAuditListVO> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
page.setTotalSize(count);
|
|
@@ -207,8 +211,18 @@ public class ArticleVideoAuditService {
|
|
|
articleAuditService.buildArticleAuditDelete(publishContentIds, "视频审核不通过删除");
|
|
|
}
|
|
|
|
|
|
- public List<String> getFilterValue(AuditFilterParam param) {
|
|
|
- return articleAuditMapper.searchFilterValueByItemName(param.getItemName(), param.getSearchKeyword());
|
|
|
+ public List<Object> getFilterValue(AuditFilterParam param) {
|
|
|
+ String itemName = param.getItemName();
|
|
|
+ if ("contentId".equals(itemName) || "title".equals(itemName) || "auditAccount".equals(itemName)) {
|
|
|
+ return articleAuditMapper.searchFilterValueByItemName(itemName, param.getSearchKeyword())
|
|
|
+ .stream().collect(Collectors.toList());
|
|
|
+ } else if ("sourceProducePlan".equals(itemName)) {
|
|
|
+ List<String> planIds = articleAuditMapper.searchFilterValueByItemName(itemName, null);
|
|
|
+ return aigcBaseMapper.articleVideoAuditPlanFilterValue(planIds, param.getSearchKeyword())
|
|
|
+ .stream().collect(Collectors.toList());
|
|
|
+ } else {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@XxlJob("rematchVideoAudit")
|
|
@@ -264,6 +278,18 @@ public class ArticleVideoAuditService {
|
|
|
audit.setAuditAccount(auditUser.get(per));
|
|
|
titleAuditRepository.save(audit);
|
|
|
}
|
|
|
+ // 内容生成计划id处理
|
|
|
+ List<LongArticleTitleAudit> list = titleAuditRepository.getByProducePlanIdIsNull();
|
|
|
+ List<String> ids = list.stream().map(LongArticleTitleAudit::getContentId).collect(Collectors.toList());
|
|
|
+ List<ProducePlanExeRecord> exeRecordList = producePlanExeRecordRepository.findByPlanExeIdIn(ids);
|
|
|
+ Map<String, String> map = exeRecordList.stream().collect(Collectors.toMap(ProducePlanExeRecord::getPlanExeId, ProducePlanExeRecord::getPlanId));
|
|
|
+ for (LongArticleTitleAudit titleAudit : list) {
|
|
|
+ String planId = map.get(titleAudit.getContentId());
|
|
|
+ if (StringUtils.hasText(planId)) {
|
|
|
+ titleAudit.setProducePlanId(planId);
|
|
|
+ titleAuditRepository.save(titleAudit);
|
|
|
+ }
|
|
|
+ }
|
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
|
}
|