Skip to content

Commit

Permalink
#560 get All Zone Link Group By Idc
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxuzhesi committed Jan 14, 2020
1 parent c699ffb commit c1dc247
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -966,15 +966,16 @@ public List<ZoneLinkDto> getAllZoneLinkGroupByIdc() {

List<CiData> zoneData = queryCiData(uiProperties.getCiTypeIdOfZone(), defaultQueryObject().addEqualsFilter("data_center", idcGuid)).getContents();
List<String> zoneList = new ArrayList<>();
for (Object zone : zoneData) {
zoneList.add(idc.getData().get(CmdbConstants.GUID).toString());
for (CiData zone : zoneData) {
zoneList.add(zone.getData().get(CmdbConstants.GUID).toString());
}
if (zoneList.size() != 0) {
List<CiData> zoneLinkData = queryCiData(uiProperties.getCiTypeIdOfZoneLink(),
defaultQueryObject()
.addInFilter("network_zone_1", zoneList)
.addInFilter("network_zone_2", zoneList)
.setFiltersRelationship("or"))
QueryRequest setFiltersRelationship = defaultQueryObject()
.addInFilter("network_zone_1", zoneList)
.addInFilter("network_zone_2", zoneList)
.setFiltersRelationship("or");
setFiltersRelationship.getDialect().setShowCiHistory(true);
List<CiData> zoneLinkData = queryCiData(uiProperties.getCiTypeIdOfZoneLink(),setFiltersRelationship)
.getContents();
result.setLinkList(zoneLinkData);
}
Expand Down

0 comments on commit c1dc247

Please sign in to comment.