Skip to content

Commit

Permalink
Dynamic: fix list bgppeers by keyword and db schema
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Jul 30, 2024
1 parent 6548b32 commit 494e275
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,6 @@ CREATE TABLE IF NOT EXISTS `cloud`.`bgp_peer_network_map` (
`removed` datetime DEFAULT NULL COMMENT 'date removed',
PRIMARY KEY (`id`),
CONSTRAINT `fk_bgp_peer_network_map__bgp_peer_id` FOREIGN KEY (`bgp_peer_id`) REFERENCES `bgp_peers`(`id`),
CONSTRAINT `fk_bgp_peer_network_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`)
CONSTRAINT `fk_bgp_peer_network_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`),
CONSTRAINT `fk_bgp_peer_network_map__vpc_id` FOREIGN KEY (`vpc_id`) REFERENCES `vpc`(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Original file line number Diff line number Diff line change
Expand Up @@ -1331,9 +1331,9 @@ private SearchCriteria createSearchCriteriaForListBgpPeersCmd(Long id, Long zone
if (StringUtils.isNotBlank(keyword)) {
SearchCriteria ssc = bgpPeerDao.createSearchCriteria();
ssc.addOr("asNumber", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("ipaddress", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("ip6address", SearchCriteria.Op.LIKE, "%" + keyword + "%");
sc.addAnd("ipaddress", SearchCriteria.Op.SC, ssc);
ssc.addOr("ip4Address", SearchCriteria.Op.LIKE, "%" + keyword + "%");
ssc.addOr("ip6Address", SearchCriteria.Op.LIKE, "%" + keyword + "%");
sc.addAnd("ip4Address", SearchCriteria.Op.SC, ssc);
}
return sc;
}
Expand Down

0 comments on commit 494e275

Please sign in to comment.