From 40bfb646d1b962d33841c1ebbceb0dd7cb668bfb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期二, 29 四月 2025 14:54:04 +0800 Subject: [PATCH] 后台日志管理 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java index 666bd4a..aa2b9e9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemRoleController.java @@ -5,6 +5,7 @@ import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.interfaces.OperLog; import com.panzhihua.common.model.vos.R; +import com.panzhihua.sangeshenbian.annotation.SysLog; import com.panzhihua.sangeshenbian.model.entity.SystemRole; import com.panzhihua.sangeshenbian.model.entity.SystemRoleMenu; import com.panzhihua.sangeshenbian.service.ISystemRoleMenuService; @@ -48,7 +49,7 @@ @PostMapping("/add") @ApiOperation(value = "添加角色", tags = {"三个身边后台-角色管理"}) - @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加角色") + @SysLog(operatorCategory = "添加角色",operId = 3) public R add(@RequestBody AddSystemRole addSystemRole){ long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0).eq(SystemRole::getName, addSystemRole.getName())); if(0 < count){ @@ -72,7 +73,7 @@ @PostMapping("/edit") @ApiOperation(value = "编辑角色", tags = {"三个身边后台-角色管理"}) - @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑角色") + @SysLog(operatorCategory = "编辑角色",operId = 3) public R edit(@RequestBody EditSystemRole editSystemRole){ long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0) .eq(SystemRole::getName, editSystemRole.getName()).ne(SystemRole::getId, editSystemRole.getId())); @@ -100,14 +101,14 @@ @DeleteMapping("/delete/{id}") @ApiOperation(value = "删除角色", tags = {"三个身边后台-角色管理"}) - @OperLog(operModul = "三个身边后台",operType = 3,businessType = "删除角色") + @SysLog(operatorCategory = "删除角色",operId = 3) public R delete(@PathVariable("id") Integer id){ SystemRole systemRole = systemRoleService.getById(id); systemRole.setDel(1); systemRoleService.updateById(systemRole); //删除角色菜单权限 systemRoleMenuService.remove(new LambdaQueryWrapper<SystemRoleMenu>().eq(SystemRoleMenu::getSystemRoleId, id)); - return R.ok(); + return R.ok(systemRole.getName()); } -- Gitblit v1.7.1