浏览代码

Merge branch 'wyp/1202-videoAuditJob' of Server/long-article-recommend into master

wangyunpeng 6 月之前
父节点
当前提交
d405e7b43c
共有 16 个文件被更改,包括 365 次插入27 次删除
  1. 32 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/common/enums/cgi/PQVideoAuditResultEnum.java
  2. 34 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/common/enums/cgi/PQVideoSensitiveLevelEnum.java
  3. 2 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/longArticle/LongArticleBaseMapper.java
  4. 11 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/cgi/PQVideoAuditResult.java
  5. 3 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/entity/longArticle/LongArticleVideoAudit.java
  6. 15 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/PQResponse.java
  7. 82 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/pq/PQVideoAuditResultService.java
  8. 79 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/pq/PQVideoAuditStartProcessService.java
  9. 2 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/repository/longArticle/LongArticleVideoAuditRepository.java
  10. 83 20
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleAuditService.java
  11. 2 3
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/web/recommend/ArticleAuditController.java
  12. 4 1
      long-article-recommend-service/src/main/resources/application-dev.yml
  13. 4 1
      long-article-recommend-service/src/main/resources/application-pre.yml
  14. 4 1
      long-article-recommend-service/src/main/resources/application-prod.yml
  15. 4 1
      long-article-recommend-service/src/main/resources/application-test.yml
  16. 4 0
      long-article-recommend-service/src/main/resources/mapper/longArticle/LongArticleBaseMapper.xml

+ 32 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/common/enums/cgi/PQVideoAuditResultEnum.java

@@ -0,0 +1,32 @@
+package com.tzld.longarticle.recommend.server.common.enums.cgi;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum PQVideoAuditResultEnum {
+    WAITING(0, "审核中"),
+    PASS(1, "审核通过"),
+    REJECT(2, "审核不通过"),
+
+    other(999, "其他"),
+    ;
+
+    private final Integer status;
+    private final String description;
+
+    PQVideoAuditResultEnum(Integer status, String description) {
+        this.status = status;
+        this.description = description;
+    }
+
+    public static PQVideoAuditResultEnum from(Integer status) {
+        for (PQVideoAuditResultEnum statusEnum : PQVideoAuditResultEnum.values()) {
+            if (Objects.equals(statusEnum.status, status)) {
+                return statusEnum;
+            }
+        }
+        return other;
+    }
+}

+ 34 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/common/enums/cgi/PQVideoSensitiveLevelEnum.java

@@ -0,0 +1,34 @@
+package com.tzld.longarticle.recommend.server.common.enums.cgi;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum PQVideoSensitiveLevelEnum {
+    NOT_CHECK(-1, "未检测"),
+    NORMAL(0, "正常"),
+    LOW_SENSITIVE(1, "初级敏感"),
+    MID_SENSITIVE(2, "中级敏感"),
+    HIGH_SENSITIVE(3, "严重敏感"),
+
+    other(999, "其他"),
+    ;
+    // -1 未检测 0 正常 1 初级敏感 2中级敏感 3 严重敏感
+    private final Integer level;
+    private final String description;
+
+    PQVideoSensitiveLevelEnum(Integer level, String description) {
+        this.level = level;
+        this.description = description;
+    }
+
+    public static PQVideoSensitiveLevelEnum from(Integer level) {
+        for (PQVideoSensitiveLevelEnum levelEnum : PQVideoSensitiveLevelEnum.values()) {
+            if (Objects.equals(levelEnum.level, level)) {
+                return levelEnum;
+            }
+        }
+        return other;
+    }
+}

+ 2 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/longArticle/LongArticleBaseMapper.java

@@ -67,4 +67,6 @@ public interface LongArticleBaseMapper {
     List<PublishSingleVideoSource> getPublishSingleVideoSource(ArticleVideoPoolSourceParam param);
 
     List<String> getFilterColdLongArticleTitle();
+
+    List<String> getExistsOssPath();
 }

+ 11 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/cgi/PQVideoAuditResult.java

@@ -0,0 +1,11 @@
+package com.tzld.longarticle.recommend.server.model.cgi;
+
+import lombok.Data;
+
+@Data
+public class PQVideoAuditResult {
+    private Long taskId;
+    private Integer auditResult;
+    private Integer sensitiveLevel;
+    private String reason;
+}

+ 3 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/entity/longArticle/LongArticleVideoAudit.java

@@ -29,6 +29,9 @@ public class LongArticleVideoAudit {
     @Column(name = "status")
     private Integer status;
 
+    @Column(name = "task_id")
+    private Long taskId;
+
     @Column(name = "fail_reason")
     private String failReason;
 

+ 15 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/PQResponse.java

@@ -0,0 +1,15 @@
+package com.tzld.longarticle.recommend.server.model.param;
+
+import lombok.Data;
+
+@Data
+public class PQResponse<T> {
+
+    private long code;
+    private String msg;
+    private T data;
+
+}
+
+
+

+ 82 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/pq/PQVideoAuditResultService.java

@@ -0,0 +1,82 @@
+package com.tzld.longarticle.recommend.server.remote.pq;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.longarticle.recommend.server.common.HttpPoolFactory;
+import com.tzld.longarticle.recommend.server.model.cgi.PQVideoAuditResult;
+import com.tzld.longarticle.recommend.server.model.param.PQResponse;
+import com.tzld.longarticle.recommend.server.repository.crawler.ArticleRepository;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.StatusLine;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+@Service
+@Slf4j
+public class PQVideoAuditResultService {
+
+    @Autowired
+    ArticleRepository articleRepository;
+
+    @Value("${pq.host:}")
+    private String host;
+
+    private final CloseableHttpClient client = HttpPoolFactory.aigcPool();
+    private static final String url = "/longvideoapi/openapi/audit/queryTaskResult";
+
+    public List<PQVideoAuditResult> getResult(List<Long> taskIds) {
+        int retryTimes = 3;
+        while (retryTimes > 0) {
+            List<PQVideoAuditResult> result = post(taskIds);
+            if (CollectionUtils.isNotEmpty(result)) {
+                return result;
+            }
+            retryTimes--;
+        }
+        return new ArrayList<>();
+    }
+
+    public List<PQVideoAuditResult> post(List<Long> taskIds) {
+        JSONObject params = new JSONObject();
+        params.put("taskIds", taskIds);
+        try {
+            HttpPost httpPost = new HttpPost(host + url);
+            StringEntity stringEntity = new StringEntity(params.toJSONString(), StandardCharsets.UTF_8);
+            httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
+            httpPost.setEntity(stringEntity);
+            CloseableHttpResponse response = client.execute(httpPost);
+            StatusLine statusLine = response.getStatusLine();
+            if (statusLine.getStatusCode() == 200) {
+                HttpEntity responseEntity = response.getEntity();
+                if (Objects.nonNull(responseEntity)) {
+                    String responseBody = EntityUtils.toString(responseEntity, "UTF-8");
+                    PQResponse pqResponse = JSONObject.parseObject(responseBody, PQResponse.class);
+                    if (pqResponse.getCode() == 0 && Objects.nonNull(pqResponse.getData())) {
+                        return JSONArray.parseArray(JSONObject.toJSONString(pqResponse.getData()), PQVideoAuditResult.class);
+                    } else {
+                        return null;
+                    }
+                }
+            }
+        } catch (IOException e) {
+            log.error("PQVideoAuditResultService error", e);
+        }
+        return null;
+    }
+
+
+}

+ 79 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/pq/PQVideoAuditStartProcessService.java

@@ -0,0 +1,79 @@
+package com.tzld.longarticle.recommend.server.remote.pq;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.longarticle.recommend.server.common.HttpPoolFactory;
+import com.tzld.longarticle.recommend.server.repository.crawler.ArticleRepository;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpEntity;
+import org.apache.http.StatusLine;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Objects;
+
+@Service
+@Slf4j
+public class PQVideoAuditStartProcessService {
+
+    @Autowired
+    ArticleRepository articleRepository;
+
+    @Value("${pq.host:}")
+    private String host;
+
+    private final CloseableHttpClient client = HttpPoolFactory.aigcPool();
+    private static final String url = "/longvideoapi/openapi/audit/startProcess";
+
+    public Long startProcess(Long videoId) {
+        int retryTimes = 3;
+        while (retryTimes > 0) {
+            Long taskId = post(videoId);
+            if (Objects.nonNull(taskId)) {
+                return taskId;
+            }
+            retryTimes--;
+        }
+        return null;
+    }
+
+    public Long post(Long videoId) {
+        JSONObject params = new JSONObject();
+        params.put("videoId", videoId);
+        try {
+            HttpPost httpPost = new HttpPost(host + url);
+            StringEntity stringEntity = new StringEntity(params.toJSONString(), StandardCharsets.UTF_8);
+            httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
+            httpPost.setEntity(stringEntity);
+            CloseableHttpResponse response = client.execute(httpPost);
+            StatusLine statusLine = response.getStatusLine();
+            if (statusLine.getStatusCode() == 200) {
+                HttpEntity responseEntity = response.getEntity();
+                if (Objects.nonNull(responseEntity)) {
+                    String responseBody = EntityUtils.toString(responseEntity, "UTF-8");
+                    JSONObject jsonObject = JSONObject.parseObject(responseBody);
+                    if (jsonObject.getInteger("code") == 0) {
+                        JSONObject data = jsonObject.getJSONObject("data");
+                        if (data.containsKey("taskId")) {
+                            return data.getLong("taskId");
+                        }
+                    } else {
+                        return null;
+                    }
+                }
+            }
+        } catch (IOException e) {
+            log.error("PQVideoAuditStartProcessService error", e);
+        }
+        return null;
+    }
+
+
+}

+ 2 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/repository/longArticle/LongArticleVideoAuditRepository.java

@@ -11,4 +11,6 @@ public interface LongArticleVideoAuditRepository extends JpaRepository<LongArtic
     LongArticleVideoAudit getByVideoId(Long videoId);
 
     List<LongArticleVideoAudit> getByVideoIdIn(List<Long> videoIds);
+
+    List<LongArticleVideoAudit> getByStatusAndTaskIdIsNotNull(Integer status);
 }

+ 83 - 20
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleAuditService.java

@@ -5,18 +5,23 @@ import com.alibaba.fastjson.JSONArray;
 import com.google.common.collect.Lists;
 import com.tzld.longarticle.recommend.server.common.enums.StatusEnum;
 import com.tzld.longarticle.recommend.server.common.enums.aigc.PushTypeEnum;
+import com.tzld.longarticle.recommend.server.common.enums.cgi.PQVideoAuditResultEnum;
+import com.tzld.longarticle.recommend.server.common.enums.cgi.PQVideoSensitiveLevelEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.ArticleDeleteStatusEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.FeishuRobotIdEnum;
 import com.tzld.longarticle.recommend.server.mapper.aigc.AigcBaseMapper;
+import com.tzld.longarticle.recommend.server.mapper.longArticle.LongArticleBaseMapper;
+import com.tzld.longarticle.recommend.server.model.cgi.PQVideoAuditResult;
 import com.tzld.longarticle.recommend.server.model.dto.*;
 import com.tzld.longarticle.recommend.server.model.entity.aigc.PublishAccount;
 import com.tzld.longarticle.recommend.server.model.entity.crawler.Article;
 import com.tzld.longarticle.recommend.server.model.entity.longArticle.*;
 import com.tzld.longarticle.recommend.server.model.param.ArticleDangerFindDeleteParam;
-import com.tzld.longarticle.recommend.server.model.param.ArticleVideoAuditResultParam;
 import com.tzld.longarticle.recommend.server.model.param.PublishContentParam;
 import com.tzld.longarticle.recommend.server.remote.WxAccessTokenRemoteService;
 import com.tzld.longarticle.recommend.server.remote.WxArticleDeleteService;
+import com.tzld.longarticle.recommend.server.remote.pq.PQVideoAuditResultService;
+import com.tzld.longarticle.recommend.server.remote.pq.PQVideoAuditStartProcessService;
 import com.tzld.longarticle.recommend.server.repository.aigc.PublishAccountRepository;
 import com.tzld.longarticle.recommend.server.repository.crawler.ArticleRepository;
 import com.tzld.longarticle.recommend.server.repository.longArticle.*;
@@ -31,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.net.URL;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
@@ -61,11 +67,17 @@ public class ArticleAuditService {
     private ArticleRepository articleRepository;
     @Autowired
     private ArticleUnsafeTitleRepository articleUnsafeTitleRepository;
+    @Autowired
+    private PQVideoAuditStartProcessService pqVideoAuditStartProcessService;
+    @Autowired
+    private PQVideoAuditResultService pqVideoAuditResultService;
+    @Autowired
+    private LongArticleBaseMapper longArticleBaseMapper;
 
 
     @XxlJob("articleVideoAudit")
     public ReturnT<String> articleVideoAudit(String param) {
-        long publishTime = DateUtils.getTodayStart();
+        long publishTime = DateUtils.getTodayStart() / 1000;
         if (StringUtils.hasText(param)) {
             publishTime = DateUtils.getStartOfDay(param, "yyyyMMdd");
         }
@@ -77,50 +89,101 @@ public class ArticleAuditService {
         List<LongArticlesMatchVideo> longArticlesMatchVideoList = longArticlesMatchVideoRepository.getByTraceIdIn(traceIds);
         Map<String, LongArticlesMatchVideo> longarticlesMatchVideoMap = longArticlesMatchVideoList.stream()
                 .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);
-            List<Long> videoIds = responseList.stream().map(LongArticlesMatchVideoResponse::getVideoID).collect(Collectors.toList());
-            List<LongArticleVideoAudit> existsList = longArticleVideoAuditRepository.getByVideoIdIn(videoIds);
-            List<Long> existsVideoIds = existsList.stream().map(LongArticleVideoAudit::getVideoId).collect(Collectors.toList());
             for (LongArticlesMatchVideoResponse response : responseList) {
-                if (existsVideoIds.contains(response.getVideoID())) {
+                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(response.getVideoOSS());
+                videoAudit.setOssPath(ossPath);
                 videoAudit.setStatus(StatusEnum.ZERO.getCode());
                 videoAudit.setCreateTimestamp(System.currentTimeMillis());
                 longArticleVideoAuditRepository.save(videoAudit);
-                // todo 调用PQ 审核视频
+                // 调用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());
+                }
             }
         }
 
         return ReturnT.SUCCESS;
     }
 
-    /**
-     * 视频审核结果处理
-     */
-    public void articleVideoAuditResult(ArticleVideoAuditResultParam param) {
-        LongArticleVideoAudit longArticleVideoAudit = longArticleVideoAuditRepository.getByVideoId(param.getVideoId());
-        if (param.getResult() == 1) {
+    private String getOssPath(String ossUrl) {
+        String result = "";
+        if (ossUrl == null || ossUrl.isEmpty()) {
+            return result;
+        }
+        try {
+            URL url = new URL(ossUrl);
+            // 去除域名
+            result = url.getPath();
+            // 获取后缀.位置
+            int endIndex = result.lastIndexOf(".");
+            if (endIndex == -1) {
+                endIndex = result.length();
+            }
+            // 去除 / 及 文件后缀
+            result = result.substring(1, endIndex);
+        } catch (Exception e) {
+            log.error("getOssPath error:{}", e.getMessage());
+        }
+        return result;
+    }
+
+    @XxlJob("articleVideoAuditResult")
+    public ReturnT<String> articleVideoAuditResult(String param) {
+        List<LongArticleVideoAudit> list = longArticleVideoAuditRepository.getByStatusAndTaskIdIsNotNull(StatusEnum.ZERO.getCode());
+        for (List<LongArticleVideoAudit> partition : Lists.partition(list, 10)) {
+            List<Long> taskIds = partition.stream().map(LongArticleVideoAudit::getTaskId).collect(Collectors.toList());
+            Map<Long, LongArticleVideoAudit> map = partition.stream().collect(Collectors.toMap(LongArticleVideoAudit::getTaskId, Function.identity()));
+            List<PQVideoAuditResult> resultList = pqVideoAuditResultService.getResult(taskIds);
+            resultList.forEach(result -> saveVideoAuditResult(map.get(result.getTaskId()), result));
+        }
+        return ReturnT.SUCCESS;
+    }
+
+
+    public void saveVideoAuditResult(LongArticleVideoAudit longArticleVideoAudit, PQVideoAuditResult result) {
+
+        if (Objects.equals(result.getAuditResult(), PQVideoAuditResultEnum.PASS.getStatus())) {
             // 审核通过,更新文章状态
-            longArticleVideoAudit.setStatus(ArticleDeleteStatusEnum.SUCCESS.getCode());
+            longArticleVideoAudit.setStatus(PQVideoAuditResultEnum.PASS.getStatus());
             longArticleVideoAudit.setFinishTimestamp(System.currentTimeMillis());
             longArticleVideoAuditRepository.save(longArticleVideoAudit);
-        } else {
+        } else if (Objects.equals(result.getAuditResult(), PQVideoAuditResultEnum.REJECT.getStatus())) {
             // 审核不通过,删除文章
-            longArticleVideoAudit.setStatus(ArticleDeleteStatusEnum.FAIL.getCode());
-            longArticleVideoAudit.setFailReason(param.getFailReason());
+            longArticleVideoAudit.setStatus(PQVideoAuditResultEnum.REJECT.getStatus());
+            PQVideoSensitiveLevelEnum sensitiveLevelEnum = PQVideoSensitiveLevelEnum.from(result.getSensitiveLevel());
+            longArticleVideoAudit.setFailReason(sensitiveLevelEnum.getDescription());
             longArticleVideoAudit.setFinishTimestamp(System.currentTimeMillis());
             longArticleVideoAuditRepository.save(longArticleVideoAudit);
             // 构建删除文章记录 并保存
-            saveDeleteRecord(longArticleVideoAudit.getOssPath());
+            // saveDeleteRecord(longArticleVideoAudit.getOssPath());
+            // 暂时不做删除 先发送通知
+            FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.ARTICLE_DELETE.getRobotId(),
+                  "视频审核不通过" +
+                          "traceId:" + longArticleVideoAudit.getTraceId() +
+                          "视频id:" + longArticleVideoAudit.getVideoId() +
+                          "视频path:" + longArticleVideoAudit.getOssPath() +
+                          "敏感等级:" + sensitiveLevelEnum.getDescription());
         }
     }
 
@@ -150,7 +213,7 @@ public class ArticleAuditService {
         Map<String, String> publishPushIdMap = pushContentRelList.stream()
                 .collect(Collectors.toMap(PublishGzhPushContentRelDTO::getPublishContentId,
                         PublishGzhPushContentRelDTO::getPushId,
-                         (o1, o2) -> o2));
+                        (o1, o2) -> o2));
         List<PublishGzhPushDTO> pushList = aigcBaseMapper.getPushByPushIdIn(pushIds);
         Map<String, PublishGzhPushDTO> pushDTOMap = pushList.stream()
                 .collect(Collectors.toMap(PublishGzhPushDTO::getPushId, Function.identity()));

+ 2 - 3
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/web/recommend/ArticleAuditController.java

@@ -2,7 +2,6 @@ package com.tzld.longarticle.recommend.server.web.recommend;
 
 import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
 import com.tzld.longarticle.recommend.server.model.param.ArticleDangerFindDeleteParam;
-import com.tzld.longarticle.recommend.server.model.param.ArticleVideoAuditResultParam;
 import com.tzld.longarticle.recommend.server.service.recommend.ArticleAuditService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,8 +21,8 @@ public class ArticleAuditController {
         service.articleVideoAudit(dateStr);
     }
 
-    @PostMapping("/articleVideoAuditResult")
-    public CommonResponse<Void> articleVideoAuditResult(@RequestBody ArticleVideoAuditResultParam param) {
+    @GetMapping("/articleVideoAuditResult")
+    public CommonResponse<Void> articleVideoAuditResult(String param) {
         service.articleVideoAuditResult(param);
         return CommonResponse.success();
     }

+ 4 - 1
long-article-recommend-service/src/main/resources/application-dev.yml

@@ -131,4 +131,7 @@ pushMessage:
     groupId: GID_3RD_PARTY_PUSH_MESSAGE_CALLBACK_DEV
     tag: mini
 
-small_page_url: https://testapi.piaoquantv.com
+small_page_url: https://testapi.piaoquantv.com
+
+pq:
+  host: https://videotest.yishihui.com

+ 4 - 1
long-article-recommend-service/src/main/resources/application-pre.yml

@@ -163,4 +163,7 @@ aliyun:
         project: wqsd-video
         store: video_blacklist_security_filter_log
 
-small_page_url: https://testapi.piaoquantv.com
+small_page_url: https://testapi.piaoquantv.com
+
+pq:
+  host: https://videopre.piaoquantv.com

+ 4 - 1
long-article-recommend-service/src/main/resources/application-prod.yml

@@ -121,4 +121,7 @@ pushMessage:
     groupId: GID_3RD_PARTY_PUSH_MESSAGE_CALLBACK_PROD
     tag: mini
 
-small_page_url: https://api.piaoquantv.com
+small_page_url: https://api.piaoquantv.com
+
+pq:
+  host: https://longvideoapi.piaoquantv.com

+ 4 - 1
long-article-recommend-service/src/main/resources/application-test.yml

@@ -153,4 +153,7 @@ aliyun:
         project: wqsd-video-test
         store: video_blacklist_security_filter_log
 
-small_page_url: https://testapi.piaoquantv.com
+small_page_url: https://testapi.piaoquantv.com
+
+pq:
+  host: https://videotest.yishihui.com

+ 4 - 0
long-article-recommend-service/src/main/resources/mapper/longArticle/LongArticleBaseMapper.xml

@@ -256,4 +256,8 @@
         </foreach>
     </insert>
 
+    <select id="getExistsOssPath" resultType="java.lang.String">
+        select distinct oss_path from long_articles_video_audit
+    </select>
+
 </mapper>