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 6427301a18..728263e229 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 @@ -3,6 +3,7 @@ package com.epmet.commons.tools.utils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.scan.param.*; @@ -16,6 +17,7 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * 扫描内容工具类 @@ -31,6 +33,15 @@ public class ScanContentUtils { * @return */ public static Result imgSyncScan(String url, ImgScanParamDTO param) { + //start 测试环境停机了,先这样改试试 + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + SyncScanResult syncScanResult=new SyncScanResult(); + syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); + syncScanResult.setAllPass(true); + return new Result().ok(syncScanResult); + }//end + log.debug("imgSyncScan param:{}", JSON.toJSONString(param)); if (StringUtils.isBlank(url) || param == null) { throw new RenException("参数错误"); @@ -57,6 +68,15 @@ public class ScanContentUtils { * @return */ public static Result textSyncScan(String url, TextScanParamDTO param) { + //start 测试环境停机了,先这样改试试 + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + SyncScanResult syncScanResult=new SyncScanResult(); + syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); + syncScanResult.setAllPass(true); + return new Result().ok(syncScanResult); + }//end + log.debug("textSyncScan param:{}", JSON.toJSONString(param)); if (StringUtils.isBlank(url) || param == null) { throw new RenException("参数错误");