add 根据数据中心查询虚拟机

develop
bayuzhen 2024-11-06 16:23:07 +08:00
parent c3599c76d5
commit d79f5dba2f
1 changed files with 5 additions and 4 deletions

View File

@ -316,11 +316,12 @@ public class CloudServerServiceImpl implements CloudServerService {
paramMap.remove("dcId");
// 查询相应云平台
List<CloudVendor> 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;