add 根据数据中心查询虚拟机
parent
28696b3a6d
commit
c3599c76d5
|
@ -70,6 +70,7 @@ import org.springframework.amqp.core.AmqpTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -315,9 +316,11 @@ public class CloudServerServiceImpl implements CloudServerService {
|
||||||
paramMap.remove("dcId");
|
paramMap.remove("dcId");
|
||||||
// 查询相应云平台
|
// 查询相应云平台
|
||||||
List<CloudVendor> cloudVendors = cloudVendorRepository.getByDcId(dcId);
|
List<CloudVendor> cloudVendors = cloudVendorRepository.getByDcId(dcId);
|
||||||
String ids = cloudVendors.stream().map(CloudVendor::getId).map(item -> String.valueOf(item)).collect(Collectors.joining(","));
|
if (!CollectionUtils.isEmpty(cloudVendors)) {
|
||||||
paramMap.put("vendorId", ids);
|
String ids = cloudVendors.stream().map(CloudVendor::getId).map(item -> String.valueOf(item)).collect(Collectors.joining(","));
|
||||||
param.setSign(Sign.IN);
|
paramMap.put("vendorId", ids);
|
||||||
|
param.setSign(Sign.IN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
Loading…
Reference in New Issue