diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java index 470fce0dfb..59b047a73b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java @@ -43,7 +43,7 @@ public class VideoScanDetailDTO implements Serializable { /** * 视频语音检测结果。具体结构描述,请参见audioScanResult。 */ - private ResultDetail audioScanResults; + private List audioScanResults; @Data diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java index bdbc3ac11a..6427301a18 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java @@ -205,9 +205,9 @@ public class ScanContentUtils { //语音检测结果 // testVoiceResults(); //视频检测任务提交 - testVideoAsyncScan(); + // testVideoAsyncScan(); //查询视频检测结果 - // testVideoResults(); + testVideoResults(); } public static void testTextSyncScan(){ @@ -269,7 +269,7 @@ public class ScanContentUtils { String url = "http://localhost:8107/epmetscan/api/videoAsyncScan"; VideoTaskDTO p = new VideoTaskDTO(); p.setDataId("1"); - p.setUrl("???"); + p.setUrl("https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210111/e996a68b9f0144a3843666c430f73086.mp4"); List list = new ArrayList<>(); list.add(p); VideoScanParamDTO param = new VideoScanParamDTO(); @@ -282,7 +282,7 @@ public class ScanContentUtils { public static void testVideoResults(){ String url = "http://localhost:8107/epmetscan/api/videoResults"; List taskIds=new ArrayList<>(); - taskIds.add("???"); + taskIds.add("vi6ZatqnJEkqf5m@FZ7Ka0AU-1tKYdk"); Result result = ScanContentUtils.videoResults(url, taskIds); System.out.println("================" + JSON.toJSONString(result)); } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java index 68934e461e..e8a7ba08ac 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java @@ -718,13 +718,15 @@ public class ScanServiceImpl implements ScanService { * @author yinzuomei * @description 返回视频语音检测结果 **/ - private boolean getVoiceFlag(VoiceAsyncScanResultDTO audioScanResults) { - if (null == audioScanResults) { + private boolean getVoiceFlag(List audioScanResults) { + if (CollectionUtils.isEmpty(audioScanResults)) { return true; } - //人工审核或者内容违规,统一视为不通过 - if (!SuggestionEnum.PASS.getCode().equals(audioScanResults.getSuggestion())) { - return false; + for(VoiceAsyncScanResultDTO m:audioScanResults){ + //人工审核或者内容违规,统一视为不通过 + if (!SuggestionEnum.PASS.getCode().equals(m.getSuggestion())) { + return false; + } } return true; } diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/video/VideoAsyncScanParam.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/video/VideoAsyncScanParam.java index fb974081c5..c0315f8c17 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/video/VideoAsyncScanParam.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/param/video/VideoAsyncScanParam.java @@ -52,7 +52,6 @@ public class VideoAsyncScanParam implements Serializable { * logo:视频logo * ad:视频图文违规 */ - @NotEmpty(message = "视频检测场景不能为空") private List scenes; /** diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/result/video/VideoScanOriginalResultDTO.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/result/video/VideoScanOriginalResultDTO.java index 8a4ee16bc2..8964d5fe00 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/result/video/VideoScanOriginalResultDTO.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/support/result/video/VideoScanOriginalResultDTO.java @@ -47,5 +47,5 @@ public class VideoScanOriginalResultDTO implements Serializable { /** * 视频语音检测结果。具体结构描述,请参见audioScanResult。 */ - private VoiceAsyncScanResultDTO audioScanResults; + private List audioScanResults; }