|
@@ -0,0 +1,81 @@
|
|
|
+package com.lantone.security.web;
|
|
|
+
|
|
|
+import com.lantone.common.api.CommonResult;
|
|
|
+import com.lantone.common.dto.MenuDTO;
|
|
|
+import com.lantone.common.vo.MenuVO;
|
|
|
+import com.lantone.common.vo.RoleSoftwareMenuVo;
|
|
|
+import com.lantone.security.facade.FuncManagementFacade;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName: FuncManagementController
|
|
|
+ * @Description: 功能管理API
|
|
|
+ * @Author songxl
|
|
|
+ * @Date 2021/7/27
|
|
|
+ * @Version 1.0
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@Api(value = "功能管理API", tags = "FuncManagementController")
|
|
|
+@RequestMapping("/func/management")
|
|
|
+public class RoleManagementController {
|
|
|
+ @Autowired
|
|
|
+ private FuncManagementFacade funcManagementFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取功能菜单列表 [by:songxl]",
|
|
|
+ notes = "RoleServiceMenuVo:角色系统功能菜单对象,必填<br>" +
|
|
|
+ "roles:角色列表,必填<br>" +
|
|
|
+ "serviceId:服务id ,必填<br>")
|
|
|
+ @PostMapping("/getMenus")
|
|
|
+ public CommonResult<List<MenuDTO>> getMenus(@RequestBody RoleSoftwareMenuVo roleServiceMenuVo) {
|
|
|
+ return CommonResult.success(funcManagementFacade.getMenusTree(roleServiceMenuVo));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "添加功能菜单 [by:songxl]",
|
|
|
+ notes = "menuVO:功能菜单对象,必填<br>" +
|
|
|
+ "opeType:操作码 1:新增;2:修改 ;3:删除;5:启用禁用")
|
|
|
+ @PostMapping("/addMenu")
|
|
|
+ @Transactional
|
|
|
+ public CommonResult<Boolean> addMenu(@RequestBody MenuVO menuVO) {
|
|
|
+ return CommonResult.success(funcManagementFacade.CRUDOperation(menuVO));
|
|
|
+ }
|
|
|
+ @ApiOperation(value = "修改功能菜单 [by:songxl]",
|
|
|
+ notes = "menuVO:功能菜单对象,必填<br>" +
|
|
|
+ "opeType:操作码 1:新增;2:修改 ;3:删除;5:启用禁用")
|
|
|
+ @PostMapping("/updateMenu")
|
|
|
+ @Transactional
|
|
|
+ public CommonResult<Boolean> updateMenu(@RequestBody MenuVO menuVO) {
|
|
|
+ return CommonResult.success(funcManagementFacade.CRUDOperation(menuVO));
|
|
|
+ }
|
|
|
+ @ApiOperation(value = "获取菜单详情 [by:songxl]",
|
|
|
+ notes = "menuVO:功能菜单对象")
|
|
|
+ @PostMapping("/getMenuById")
|
|
|
+ public CommonResult<MenuDTO> getMenuById(@RequestBody MenuVO menuVO) {
|
|
|
+ return CommonResult.success(funcManagementFacade.getMenuById(menuVO));
|
|
|
+ }
|
|
|
+ @ApiOperation(value = "删除功能菜单 [by:songxl]",
|
|
|
+ notes = "menuVO:功能菜单对象,必填<br>" +
|
|
|
+ "opeType:操作码 1:新增;2:修改 ;3:删除;5:启用禁用")
|
|
|
+ @PostMapping("/deleteMenu")
|
|
|
+ @Transactional
|
|
|
+ public CommonResult<Boolean> deleteMenu(@RequestBody MenuVO menuVO) {
|
|
|
+ return CommonResult.success(funcManagementFacade.CRUDOperation(menuVO));
|
|
|
+ }
|
|
|
+ @ApiOperation(value = "启用禁用功能菜单 [by:songxl]",
|
|
|
+ notes = "menuVO:功能菜单对象,必填<br>" +
|
|
|
+ "opeType:操作码 1:新增;2:修改 ;3:删除;5:启用禁用")
|
|
|
+ @PostMapping("/disableMenu")
|
|
|
+ @Transactional
|
|
|
+ public CommonResult<Boolean> disableMenu(@RequestBody MenuVO menuVO) {
|
|
|
+ return CommonResult.success(funcManagementFacade.CRUDOperation(menuVO));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|