Explorar o código

后台指标管理新建菜单表 提供查询接口

ZhangManMan %!s(int64=2) %!d(string=hai) anos
pai
achega
64a6338316

+ 10 - 0
src/main/java/com/sky/ioc/controller/system/IndexController.java

@@ -2,6 +2,7 @@ package com.sky.ioc.controller.system;
 
 import com.sky.ioc.entity.Index;
 import com.sky.ioc.service.system.IndexService;
+import com.sky.ioc.service.system.SystemMenusService;
 import com.sky.ioc.tool.ReturnMsg;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -22,6 +23,9 @@ public class IndexController {
     @Autowired
     IndexService indexService;
 
+    @Autowired
+    SystemMenusService systemMenusService;
+
     @ApiOperation("指标列表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "parentId", value = "父id", dataType = "Integer"),
@@ -58,4 +62,10 @@ public class IndexController {
     public ReturnMsg batchDelByIds(@RequestBody List<Integer> ids) {
         return indexService.delBatchById(ids);
     }
+
+    @ApiOperation("查询所有菜单")
+    @GetMapping("getSystemMenusList")
+    public ReturnMsg getSystemMenusList( @RequestParam(value = "parentId", required=false,defaultValue = "-1")  long parentId){
+        return systemMenusService.getSystemMenusInfoList(parentId);
+    }
 }

+ 2 - 7
src/main/java/com/sky/ioc/controller/system/MenuController.java

@@ -22,8 +22,7 @@ public class MenuController {
     @Autowired
     MenuService menuService;
 
-    @Autowired
-    SystemMenusService systemMenusService;
+
 
     @ApiOperation("查询所有菜单")
     @GetMapping("getMenusList")
@@ -38,9 +37,5 @@ public class MenuController {
     }
 
 
-    @ApiOperation("查询所有菜单--后台")
-    @GetMapping("getSystemMenusList")
-    public ReturnMsg getSystemMenusList( @RequestParam(value = "parentId", required=false,defaultValue = "-1")  long parentId){
-        return systemMenusService.getSystemMenusInfoList(parentId);
-    }
+
 }