diff --git a/src/main/java/ink/wgink/gateway/handler/route/RouteHandler.java b/src/main/java/ink/wgink/gateway/handler/route/RouteHandler.java index 7ec8444..ddddbde 100644 --- a/src/main/java/ink/wgink/gateway/handler/route/RouteHandler.java +++ b/src/main/java/ink/wgink/gateway/handler/route/RouteHandler.java @@ -90,16 +90,19 @@ public class RouteHandler extends BaseHandler { * @return */ public Mono list(ServerRequest serverRequest) { - Optional keyword = serverRequest.queryParam("keyword"); + Optional keywords = serverRequest.queryParam("keywords"); + Route route = new Route(); - ExampleMatcher exampleMatcher = ExampleMatcher.matchingAny() - .withMatcher("system", ExampleMatcher.GenericPropertyMatcher::contains) - .withMatcher("summary", ExampleMatcher.GenericPropertyMatcher::contains) - .withIgnoreCase("id"); - Example example = Example.of(route, exampleMatcher); - if (keyword.isPresent()) { - route.setSystem(keyword.get()); - route.setSummary(keyword.get()); + Example example = Example.of(route); + if (keywords.isPresent()) { + route.setSystem(keywords.get()); + route.setSummary(keywords.get()); + + ExampleMatcher exampleMatcher = ExampleMatcher.matchingAny() + .withMatcher("system", ExampleMatcher.GenericPropertyMatcher::contains) + .withMatcher("summary", ExampleMatcher.GenericPropertyMatcher::contains) + .withIgnoreCase("id"); + example = Example.of(route, exampleMatcher); } return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(routeDao.findAll(example), Route.class); } diff --git a/src/main/java/ink/wgink/gateway/router/RouteRouter.java b/src/main/java/ink/wgink/gateway/router/RouteRouter.java index a6a3465..48cce2a 100644 --- a/src/main/java/ink/wgink/gateway/router/RouteRouter.java +++ b/src/main/java/ink/wgink/gateway/router/RouteRouter.java @@ -29,7 +29,7 @@ public class RouteRouter { @Bean public RouterFunction routeRouterFunction(RouteHandler routeHandler) { // 嵌套 - return RouterFunctions.nest(RequestPredicates.path("/wg/route"), + return RouterFunctions.nest(RequestPredicates.path("/wg/api/route"), RouterFunctions .route(RequestPredicates.POST("/save"), routeHandler::save) .andRoute(RequestPredicates.DELETE("/delete/{ids}"), routeHandler::delete) diff --git a/src/main/resources/static/wg/assets/layui-v2.6.4/layui/css/admin.css b/src/main/resources/static/wg/assets/layui-v2.6.4/layui/css/admin.css new file mode 100644 index 0000000..c99f0f4 --- /dev/null +++ b/src/main/resources/static/wg/assets/layui-v2.6.4/layui/css/admin.css @@ -0,0 +1,25 @@ +html { + background: #f3f3f3 +} + +.iframe-container { + margin: 15px; + background: #FFFFFF; +} + +.iframe-container .iframe-box {} + +.iframe-container .iframe-box iframe { + padding: 0; +} + +.iframe-container .iframe-breadcrumb-box { + padding: 15px; + border-bottom: 1px solid #F3F3F3; +} + +.list-page-container { + background: #FFFFFF; + padding: 15px 15px 5px 15px; +} + diff --git a/src/main/resources/static/wg/route/index.html b/src/main/resources/static/wg/route/index.html index 6bf4ab9..02fbce3 100644 --- a/src/main/resources/static/wg/route/index.html +++ b/src/main/resources/static/wg/route/index.html @@ -4,10 +4,11 @@ 网关管理 - + + -
+
  • @@ -26,8 +27,16 @@
-
-
+ @@ -36,16 +45,27 @@ -
-
+
+
+
+
+
+ +
+
+ +
+
+
+ +