From 35384ec146430f127bb2429ba0c80965e1242b27 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Thu, 15 Jun 2023 23:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.6.0=E3=80=91=E3=80=90sys=E3=80=91?= =?UTF-8?q?=E3=80=90menu=E3=80=91=E5=88=9D=E5=A7=8B=E5=8C=96=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysMenuOptionsController.java | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 kernel-s-sys/sys-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/menu/controller/SysMenuOptionsController.java diff --git a/kernel-s-sys/sys-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/menu/controller/SysMenuOptionsController.java b/kernel-s-sys/sys-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/menu/controller/SysMenuOptionsController.java new file mode 100644 index 000000000..3eb8848ed --- /dev/null +++ b/kernel-s-sys/sys-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/menu/controller/SysMenuOptionsController.java @@ -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 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> page(SysMenuOptionsRequest sysMenuOptionsRequest) { + return new SuccessResponseData<>(sysMenuOptionsService.findPage(sysMenuOptionsRequest)); + } + +}