mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【menu】初始化菜单功能
parent
04490524a3
commit
35384ec146
|
@ -0,0 +1,78 @@
|
|||
package cn.stylefeng.roses.kernel.sys.modular.menu.controller;
|
||||
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.menu.entity.SysMenuOptions;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.menu.pojo.request.SysMenuOptionsRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.menu.service.SysMenuOptionsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 菜单下的功能操作接口
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2023/06/15 23:04
|
||||
*/
|
||||
@RestController
|
||||
@ApiResource(name = "菜单下的功能操作接口")
|
||||
public class SysMenuOptionsController {
|
||||
|
||||
@Resource
|
||||
private SysMenuOptionsService sysMenuOptionsService;
|
||||
|
||||
/**
|
||||
* 添加菜单功能
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2023/06/15 23:04
|
||||
*/
|
||||
@PostResource(name = "添加菜单功能", path = "/sysMenuOptions/add")
|
||||
public ResponseData<SysMenuOptions> add(@RequestBody @Validated(SysMenuOptionsRequest.add.class) SysMenuOptionsRequest sysMenuOptionsRequest) {
|
||||
sysMenuOptionsService.add(sysMenuOptionsRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单功能
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2023/06/15 23:04
|
||||
*/
|
||||
@PostResource(name = "删除菜单功能", path = "/sysMenuOptions/delete")
|
||||
public ResponseData<?> delete(@RequestBody @Validated(SysMenuOptionsRequest.delete.class) SysMenuOptionsRequest sysMenuOptionsRequest) {
|
||||
sysMenuOptionsService.del(sysMenuOptionsRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑菜单功能
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2023/06/15 23:04
|
||||
*/
|
||||
@PostResource(name = "编辑菜单功能", path = "/sysMenuOptions/edit")
|
||||
public ResponseData<?> edit(@RequestBody @Validated(SysMenuOptionsRequest.edit.class) SysMenuOptionsRequest sysMenuOptionsRequest) {
|
||||
sysMenuOptionsService.edit(sysMenuOptionsRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询-菜单功能
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2023/06/15 23:04
|
||||
*/
|
||||
@GetResource(name = "分页查询-菜单功能", path = "/sysMenuOptions/page")
|
||||
public ResponseData<PageResult<SysMenuOptions>> page(SysMenuOptionsRequest sysMenuOptionsRequest) {
|
||||
return new SuccessResponseData<>(sysMenuOptionsService.findPage(sysMenuOptionsRequest));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue