|
|
@@ -1,6 +1,7 @@
|
|
|
package com.zhongzheng.controller.system;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import com.zhongzheng.common.annotation.Log;
|
|
|
import com.zhongzheng.common.constant.Constants;
|
|
|
import com.zhongzheng.common.constant.UserConstants;
|
|
|
@@ -13,6 +14,8 @@ import com.zhongzheng.common.utils.SecurityUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.framework.web.service.TokenService;
|
|
|
import com.zhongzheng.modules.system.service.ISysMenuService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -25,6 +28,7 @@ import java.util.List;
|
|
|
*
|
|
|
* @author zhongzheng
|
|
|
*/
|
|
|
+@Api(tags ="菜单管理")
|
|
|
@RestController
|
|
|
@RequestMapping("/system/menu")
|
|
|
public class SysMenuController extends BaseController
|
|
|
@@ -38,6 +42,8 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 获取菜单列表
|
|
|
*/
|
|
|
+ @ApiOperation("获取菜单列表")
|
|
|
+ @ApiOperationSupport(includeParameters = {"ignore_all"})
|
|
|
@PreAuthorize("@ss.hasPermi('system:menu:list')")
|
|
|
@GetMapping("/list")
|
|
|
public AjaxResult list(SysMenu menu)
|
|
|
@@ -51,6 +57,7 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 根据菜单编号获取详细信息
|
|
|
*/
|
|
|
+ @ApiOperation("根据菜单编号获取详细信息")
|
|
|
@PreAuthorize("@ss.hasPermi('system:menu:query')")
|
|
|
@GetMapping(value = "/{menuId}")
|
|
|
public AjaxResult getInfo(@PathVariable Long menuId)
|
|
|
@@ -61,6 +68,8 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 获取菜单下拉树列表
|
|
|
*/
|
|
|
+ @ApiOperation("获取菜单下拉树列表")
|
|
|
+ @ApiOperationSupport(includeParameters = {})
|
|
|
@GetMapping("/treeselect")
|
|
|
public AjaxResult treeselect(SysMenu menu)
|
|
|
{
|
|
|
@@ -73,6 +82,7 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 加载对应角色菜单列表树
|
|
|
*/
|
|
|
+ @ApiOperation("加载对应角色菜单列表树")
|
|
|
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
|
|
|
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
|
|
|
{
|
|
|
@@ -87,6 +97,9 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 新增菜单
|
|
|
*/
|
|
|
+ @ApiOperation("新增菜单")
|
|
|
+ @ApiOperationSupport(ignoreParameters = {"children","createBy","createTime","menuId","params"
|
|
|
+ ,"parentName","remark","updateBy","updateTime"})
|
|
|
@PreAuthorize("@ss.hasPermi('system:menu:add')")
|
|
|
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
@@ -108,6 +121,9 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 修改菜单
|
|
|
*/
|
|
|
+ @ApiOperation("修改菜单")
|
|
|
+ @ApiOperationSupport(ignoreParameters = {"children","createBy","createTime","params"
|
|
|
+ ,"parentName","remark","updateBy","updateTime"})
|
|
|
@PreAuthorize("@ss.hasPermi('system:menu:edit')")
|
|
|
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
@@ -133,6 +149,7 @@ public class SysMenuController extends BaseController
|
|
|
/**
|
|
|
* 删除菜单
|
|
|
*/
|
|
|
+ @ApiOperation("删除菜单")
|
|
|
@PreAuthorize("@ss.hasPermi('system:menu:remove')")
|
|
|
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{menuId}")
|