From d79f5dba2fe99dd89c79fa8f4bae65b604b86a5d Mon Sep 17 00:00:00 2001 From: bayuzhen Date: Wed, 6 Nov 2024 16:23:07 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=A0=B9=E6=8D=AE=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E6=9F=A5=E8=AF=A2=E8=99=9A=E6=8B=9F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bocloud/cmp/service/impl/CloudServerServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/bocloud/cmp/service/impl/CloudServerServiceImpl.java b/src/main/java/com/bocloud/cmp/service/impl/CloudServerServiceImpl.java index ae0ff1f..0780b08 100644 --- a/src/main/java/com/bocloud/cmp/service/impl/CloudServerServiceImpl.java +++ b/src/main/java/com/bocloud/cmp/service/impl/CloudServerServiceImpl.java @@ -316,11 +316,12 @@ public class CloudServerServiceImpl implements CloudServerService { paramMap.remove("dcId"); // 查询相应云平台 List cloudVendors = cloudVendorRepository.getByDcId(dcId); - if (!CollectionUtils.isEmpty(cloudVendors)) { - String ids = cloudVendors.stream().map(CloudVendor::getId).map(item -> String.valueOf(item)).collect(Collectors.joining(",")); - paramMap.put("vendorId", ids); - param.setSign(Sign.IN); + if (CollectionUtils.isEmpty(cloudVendors)) { + return new GeneralResult<>(true, null, "查询成功"); } + String ids = cloudVendors.stream().map(CloudVendor::getId).map(item -> String.valueOf(item)).collect(Collectors.joining(",")); + paramMap.put("vendorId", ids); + param.setSign(Sign.IN); } } int total = 0;