|
@@ -110,11 +110,13 @@ public class ArticleAuditService {
|
|
|
List<LongArticlesMatchVideoResponse> responseList = JSONArray.parseArray(longArticlesMatchVideo.getResponse()
|
|
|
, LongArticlesMatchVideoResponse.class);
|
|
|
for (LongArticlesMatchVideoResponse response : responseList) {
|
|
|
- String ossPath = getOssPath(response.getVideoPath());
|
|
|
- if (existsOssPath.contains(ossPath)) {
|
|
|
- continue;
|
|
|
+ String ossPath = response.getVideoOSS();
|
|
|
+ if (StringUtils.hasText(ossPath)) {
|
|
|
+ if (existsOssPath.contains(ossPath)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ existsOssPath.add(ossPath);
|
|
|
}
|
|
|
- existsOssPath.add(ossPath);
|
|
|
LongArticleVideoAudit videoAudit = new LongArticleVideoAudit();
|
|
|
videoAudit.setVideoId(response.getVideoID());
|
|
|
videoAudit.setTraceId(traceId);
|
|
@@ -202,20 +204,31 @@ public class ArticleAuditService {
|
|
|
// 暂时不做删除 先发送通知
|
|
|
if (longArticleVideoAudit.getStatus().equals(PQVideoAuditResultEnum.REJECT.getStatus())) {
|
|
|
FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.ARTICLE_DELETE.getRobotId(),
|
|
|
- "视频审核不通过\n" +
|
|
|
+ "视频审核不通过【"+sensitiveLevelEnum.getDescription()+"】\n" +
|
|
|
"traceId:" + longArticleVideoAudit.getTraceId() + "\n" +
|
|
|
"视频id:" + longArticleVideoAudit.getVideoId() + "\n" +
|
|
|
- "视频path:" + longArticleVideoAudit.getOssPath() + "\n" +
|
|
|
- "敏感等级:" + sensitiveLevelEnum.getDescription() + "\n" +
|
|
|
- "管理后台地址:https://admin.piaoquantv.com/cms/post-detail/" + longArticleVideoAudit.getVideoId() + "/detail");
|
|
|
+ "管理后台地址:https://admin.piaoquantv.com/cms/post-detail/" + longArticleVideoAudit.getVideoId() + "/detail\n" +
|
|
|
+ "操作删除视频及文章(慎点):" +
|
|
|
+ "http://192.168.203.83:30081/articleAudit/saveDeleteRecord?videoId=" + longArticleVideoAudit.getVideoId());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void saveDeleteRecord(String ossPath) {
|
|
|
- List<LongArticleCrawlerVideo> crawlerVideoList = longArticleCrawlerVideoRepository.getByVideoOssPath(ossPath);
|
|
|
+ public String saveDeleteRecord(Long videoId) {
|
|
|
+ GetOffVideoArticle getOffVideos = getOffVideoArticleRepository.getByVideoId(videoId);
|
|
|
+ String traceId = getOffVideos.getTraceId();
|
|
|
+ LongArticlesMatchVideo matchVideo = longArticlesMatchVideoRepository.getByTraceId(traceId);
|
|
|
+ List<LongArticlesMatchVideoResponse> responseList = JSONArray.parseArray(matchVideo.getResponse()
|
|
|
+ , LongArticlesMatchVideoResponse.class);
|
|
|
+ LongArticlesMatchVideoResponse response = responseList.stream()
|
|
|
+ .filter(o -> o.getVideoID() == videoId).findFirst().orElse(null);
|
|
|
+ if (Objects.isNull(response) || !StringUtils.hasText(response.getVideoOSS())) {
|
|
|
+ return "matchVideo response videoOss null videoId:" + videoId + " traceId:" + traceId;
|
|
|
+ }
|
|
|
+ List<LongArticleCrawlerVideo> crawlerVideoList = longArticleCrawlerVideoRepository.getByVideoOssPath(response.getVideoOSS());
|
|
|
if (CollectionUtils.isEmpty(crawlerVideoList)) {
|
|
|
- return;
|
|
|
+ return "matchVideo response videoOss findCrawlerVideo Null videoId:" + videoId +
|
|
|
+ " traceId:" + traceId + " videoOss:" + response.getVideoOSS();
|
|
|
}
|
|
|
for (LongArticleCrawlerVideo longArticleCrawlerVideo : crawlerVideoList) {
|
|
|
longArticleCrawlerVideo.setIsIllegal(1);
|
|
@@ -240,9 +253,10 @@ public class ArticleAuditService {
|
|
|
List<String> deleteTraceIds = publishContentIds.stream().map(PublishTraceIdMap::get).collect(Collectors.toList());
|
|
|
// 重新匹配小程序
|
|
|
List<String> reMatchTraceIds = traceIds.stream().filter(o -> !deleteTraceIds.contains(o)).collect(Collectors.toList());
|
|
|
- buildReMatchRecord(reMatchTraceIds, ossPath, matchVideoMap);
|
|
|
+ buildReMatchRecord(reMatchTraceIds, response.getVideoOSS(), matchVideoMap);
|
|
|
// 文章删除
|
|
|
buildArticleAuditDelete(publishContentIds);
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
private void buildReMatchRecord(List<String> reMatchTraceIds, String ossPath,
|
|
@@ -497,8 +511,8 @@ public class ArticleAuditService {
|
|
|
}
|
|
|
// 处理视频内容池内容
|
|
|
List<PublishContentDTO> videoPoolContents = publishContents.stream()
|
|
|
- .filter(o -> Objects.equals(o.getSourceType(), PublishPlanInputSourceTypesEnum.longArticleVideoPoolSource.getVal()))
|
|
|
- .collect(Collectors.toList());
|
|
|
+ .filter(o -> Objects.equals(o.getSourceType(), PublishPlanInputSourceTypesEnum.longArticleVideoPoolSource.getVal()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(videoPoolContents)) {
|
|
|
for (PublishContentDTO videoPoolContent : videoPoolContents) {
|
|
|
longArticleBaseMapper.updateVideoPoolContentBad(videoPoolContent.getSourceId());
|