From 9daaa17c74cb7a714f89fc2f9167a14a569fc876 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 4 Aug 2020 15:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E3=80=91-=E3=80=90=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=9A=8F=E6=89=8B=E8=AE=B0=E6=96=B0=E5=A2=9E=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8A=9F=E8=83=BD=E5=8D=87=E7=BA=A7=E3=80=91-?= =?UTF-8?q?=EF=BC=88=E7=8E=8B=E7=AB=A5=EF=BC=89-2020/8/4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security/content/CheckDataUtils.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java b/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java index d60c5fd..f1a578b 100644 --- a/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java +++ b/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java @@ -247,6 +247,39 @@ public class CheckDataUtils { return result; } + /** + * @describe: 系统判定为违规,后台处理为待审核 + * @author wangtong + * @date 2020/8/4 13:57 + * @params [contentResult, imgResult] + * @return com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO + */ + public static CheckResultMessageDTO saveTwoTypes(CheckResultDTO contentResult, CheckResultDTO imgResult) { + CheckResultMessageDTO result = new CheckResultMessageDTO(); + //如果是文字待审核 + if (contentResult != null && contentResult.getDetails() != null && 200 == contentResult.getDetails().get(0).getCode()) { + if (block.equals(contentResult.getDetails().get(0).getResults().get(0).getSuggestion())) { + result.setSuggestion(review); + result.setLabel(contentResult.getDetails().get(0).getResults().get(0).getLabel()); + result.setRate(contentResult.getDetails().get(0).getResults().get(0).getRate()); + return result; + } + } + if (imgResult != null && imgResult.getDetails() != null && 200 == imgResult.getDetails().get(0).getCode()) {//如果是图片待审核 + for (CheckResultDetailsDTO details : imgResult.getDetails()) { + for (CheckDetailResultsDTO detailResult : details.getResults()) { + if (block.equals(detailResult.getSuggestion())) { + result.setSuggestion(review); + result.setLabel(detailResult.getLabel()); + result.setRate(detailResult.getRate()); + return result; + } + } + } + } + return result; + } + /** * @param :[ userId :用户ID,