|
@@ -91,35 +91,39 @@ public class ArticleAuditService {
|
|
|
.collect(Collectors.toMap(LongArticlesMatchVideo::getTraceId, Function.identity()));
|
|
|
List<String> existsOssPath = longArticleBaseMapper.getExistsOssPath();
|
|
|
for (String traceId : traceIds) {
|
|
|
- LongArticlesMatchVideo longArticlesMatchVideo = longarticlesMatchVideoMap.get(traceId);
|
|
|
- List<LongArticlesMatchVideoResponse> responseList = JSONArray.parseArray(longArticlesMatchVideo.getResponse()
|
|
|
- , LongArticlesMatchVideoResponse.class);
|
|
|
- for (LongArticlesMatchVideoResponse response : responseList) {
|
|
|
- String ossPath = getOssPath(response.getVideoPath());
|
|
|
- if (existsOssPath.contains(ossPath)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- existsOssPath.add(ossPath);
|
|
|
- LongArticleVideoAudit videoAudit = new LongArticleVideoAudit();
|
|
|
- videoAudit.setVideoId(response.getVideoID());
|
|
|
- videoAudit.setTraceId(traceId);
|
|
|
- videoAudit.setContentId(longArticlesMatchVideo.getContentId());
|
|
|
- videoAudit.setOssPath(ossPath);
|
|
|
- videoAudit.setStatus(StatusEnum.ZERO.getCode());
|
|
|
- videoAudit.setCreateTimestamp(System.currentTimeMillis());
|
|
|
- longArticleVideoAuditRepository.save(videoAudit);
|
|
|
- // 调用PQ 审核视频
|
|
|
- try {
|
|
|
- Long taskId = pqVideoAuditStartProcessService.startProcess(response.getVideoID());
|
|
|
- if (Objects.nonNull(taskId)) {
|
|
|
- videoAudit.setTaskId(taskId);
|
|
|
- longArticleVideoAuditRepository.save(videoAudit);
|
|
|
- } else {
|
|
|
- log.error("PQVideoAuditStartProcess start process error videoId:{} ", response.getVideoID());
|
|
|
+ try {
|
|
|
+ LongArticlesMatchVideo longArticlesMatchVideo = longarticlesMatchVideoMap.get(traceId);
|
|
|
+ List<LongArticlesMatchVideoResponse> responseList = JSONArray.parseArray(longArticlesMatchVideo.getResponse()
|
|
|
+ , LongArticlesMatchVideoResponse.class);
|
|
|
+ for (LongArticlesMatchVideoResponse response : responseList) {
|
|
|
+ String ossPath = getOssPath(response.getVideoPath());
|
|
|
+ if (existsOssPath.contains(ossPath)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ existsOssPath.add(ossPath);
|
|
|
+ LongArticleVideoAudit videoAudit = new LongArticleVideoAudit();
|
|
|
+ videoAudit.setVideoId(response.getVideoID());
|
|
|
+ videoAudit.setTraceId(traceId);
|
|
|
+ videoAudit.setContentId(longArticlesMatchVideo.getContentId());
|
|
|
+ videoAudit.setOssPath(ossPath);
|
|
|
+ videoAudit.setStatus(StatusEnum.ZERO.getCode());
|
|
|
+ videoAudit.setCreateTimestamp(System.currentTimeMillis());
|
|
|
+ longArticleVideoAuditRepository.save(videoAudit);
|
|
|
+ // 调用PQ 审核视频
|
|
|
+ try {
|
|
|
+ Long taskId = pqVideoAuditStartProcessService.startProcess(response.getVideoID());
|
|
|
+ if (Objects.nonNull(taskId)) {
|
|
|
+ videoAudit.setTaskId(taskId);
|
|
|
+ longArticleVideoAuditRepository.save(videoAudit);
|
|
|
+ } else {
|
|
|
+ log.error("PQVideoAuditStartProcess start process error videoId:{} ", response.getVideoID());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("PQVideoAuditStartProcess start process videoId:{} error:{}", response.getVideoID(), e.getMessage());
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("PQVideoAuditStartProcess start process videoId:{} error:{}", response.getVideoID(), e.getMessage());
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("articleVideoAudit traceId:{} error:{}", traceId, e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|