...
|
...
|
@@ -56,11 +56,8 @@ public class CascadeController { |
|
|
*/
|
|
|
@GetMapping("/host")
|
|
|
public ResultJson getVirtualHostList(@RequestParam(value = "serverId", required = false) String serverId) {
|
|
|
|
|
|
VirtualHost virtualHost = new VirtualHost();
|
|
|
// 获取参数,所属服务器ID
|
|
|
virtualHost.setServerId(serverId);
|
|
|
|
|
|
// 获取查询参数
|
|
|
VirtualHost virtualHost = VirtualHost.builder().serverId(serverId).build();
|
|
|
List<VirtualHost> virtualHosts = virtualHostService.getVirtualHostList(virtualHost);
|
|
|
return virtualHosts.size() > 0
|
|
|
? new ResultJson<>("200", "查询虚拟主机,成功", virtualHosts)
|
...
|
...
|
@@ -75,11 +72,8 @@ public class CascadeController { |
|
|
*/
|
|
|
@GetMapping("/exchange")
|
|
|
public ResultJson getExchangeList(@RequestParam(value = "virtualHostId", required = false) String virtualHostId) {
|
|
|
|
|
|
BusExchange busExchange = new BusExchange();
|
|
|
// 获取参数,所属虚拟主机ID
|
|
|
busExchange.setVirtualHostId(virtualHostId);
|
|
|
|
|
|
// 获取查询参数
|
|
|
BusExchange busExchange = BusExchange.builder().virtualHostId(virtualHostId).build();
|
|
|
List<BusExchange> busExchanges = busExchangeService.getExchangeList(busExchange);
|
|
|
return busExchanges.size() > 0
|
|
|
? new ResultJson<>("200", "查询交换机列表,成功", busExchanges)
|
...
|
...
|
@@ -94,11 +88,8 @@ public class CascadeController { |
|
|
*/
|
|
|
@GetMapping("/queue")
|
|
|
public ResultJson getQueueList(@RequestParam(value = "virtualHostId", required = false) String virtualHostId) {
|
|
|
|
|
|
BusQueue busQueue = new BusQueue();
|
|
|
// 获取参数,所属虚拟主机ID
|
|
|
busQueue.setVirtualHostId(virtualHostId);
|
|
|
|
|
|
// 获取查询参数
|
|
|
BusQueue busQueue = BusQueue.builder().virtualHostId(virtualHostId).build();
|
|
|
List<BusQueue> busQueues = busQueueService.getQueueList(busQueue);
|
|
|
return busQueues.size() > 0
|
|
|
? new ResultJson<>("200", "查询队列列表,成功", busQueues)
|
...
|
...
|
@@ -113,9 +104,8 @@ public class CascadeController { |
|
|
*/
|
|
|
@GetMapping("/routing")
|
|
|
public ResultJson getRoutingKeyList(@RequestParam(value = "exchangeId", required = false) String exchangeId) {
|
|
|
RoutingKey routingKey = new RoutingKey();
|
|
|
// 获取参数,交换机ID
|
|
|
routingKey.setExchangeId(exchangeId);
|
|
|
// 获取查询参数
|
|
|
RoutingKey routingKey = RoutingKey.builder().exchangeId(exchangeId).build();
|
|
|
List<RoutingKey> routingKeys = routingKeyService.getRoutingKeyList(routingKey);
|
|
|
return routingKeys.size() > 0
|
|
|
? new ResultJson<>("200", "查询路由键列表,成功", routingKeys)
|
...
|
...
|
@@ -146,6 +136,7 @@ public class CascadeController { |
|
|
*/
|
|
|
@GetMapping("/server_host_exchange")
|
|
|
public ResultJson getServerAndHostAndExchangeList() {
|
|
|
|
|
|
List<BusServer> servers = busServerService.getServerAndHostAndExchangeList();
|
|
|
return servers.size() > 0
|
|
|
? new ResultJson<>("200", "查询服务器、虚拟主机、交换机信息,成功", servers)
|
...
|
...
|
|