From 10c5df340aa53b1e617ef3d51a9f8ce54e438839 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Wed, 10 Jun 2020 12:12:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AD=98=E5=82=A8=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E4=B8=AD=E6=A0=87=E7=AD=BE"|"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index dad669ecd4..e1b2be9bcf 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -264,7 +264,7 @@ public class ArticleServiceImpl extends BaseServiceImpl tagNameList = fromDTO.getTagNameList(); tagNameList = tagNameList.stream().distinct().collect(Collectors.toList()); - String tagNamesStr = StringUtils.join(tagNameList, "\\|"); + String tagNamesStr = StringUtils.join(tagNameList, "|"); draftEntity.setTags(tagNamesStr); } draftEntity.setIsTop(fromDTO.getIsTop()); From 2178abc59157655b6dfd232785f12889b755d74b Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 10 Jun 2020 12:30:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/utils/ScanContentUtils.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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 9a757beae6..52dde4192d 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 @@ -1,6 +1,7 @@ package com.epmet.commons.tools.utils; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; @@ -36,7 +37,7 @@ public class ScanContentUtils { Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param)); log.debug("imgSyncScan result:{}", JSON.toJSONString(param)); if (result.success()) { - return JSON.parseObject(result.getData(),Result.class); + return JSON.parseObject(result.getData(),new TypeReference>(){}); } Result resultResult = new Result<>(); resultResult.error(result.getCode(),result.getMsg()); @@ -62,7 +63,8 @@ public class ScanContentUtils { Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param)); log.debug("textSyncScan result:{}", JSON.toJSONString(result)); if (result.success()) { - return JSON.parseObject(result.getData(),Result.class); + //return JSON.parseObject(result.getData(),Result.class); + return JSON.parseObject(result.getData(),new TypeReference>(){}); } Result resultResult = new Result<>(); resultResult.error(result.getCode(),result.getMsg()); @@ -83,7 +85,17 @@ public class ScanContentUtils { list.add(p); TextScanParamDTO param = new TextScanParamDTO(); param.setTasks(list); - Result result = ScanContentUtils.textSyncScan(url, param); - System.out.println(JSON.toJSONString(result)); - } + Result imgSyncScanResult = ScanContentUtils.textSyncScan(url, param); + System.out.println(JSON.toJSONString(imgSyncScanResult)); + SyncScanResult result = new SyncScanResult(); + if (imgSyncScanResult != null){ + SyncScanResult imgSyncScanResultData = imgSyncScanResult.getData(); + if (imgSyncScanResult.success()&&imgSyncScanResultData.isAllPass()) { + result.setAllPass(imgSyncScanResultData.isAllPass()); + result.getSuccessDataIds().addAll(imgSyncScanResultData.getSuccessDataIds()); + result.getFailDataIds().addAll(imgSyncScanResultData.getFailDataIds()); + System.out.println("================"+JSON.toJSONString(result)); + } + } + } }