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;