浏览代码

增加系统管理类的操作日志

wukai 1 年之前
父节点
当前提交
347737d722

+ 8 - 4
doc-admin/src/main/java/com/doc/web/controller/system/SysConfigController.java

@@ -5,6 +5,7 @@ import com.doc.common.core.controller.BaseController;
 import com.doc.common.core.domain.AjaxResult;
 import com.doc.common.core.page.TableDataInfo;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.system.domain.SysConfig;
 import com.doc.system.service.ISysConfigService;
@@ -31,6 +32,7 @@ public class SysConfigController extends BaseController {
      * 获取参数配置列表
      */
     @PreAuthorize("@ss.hasPermi('system:config:list')")
+    @Log(title = "参数管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/list")
     public TableDataInfo list(SysConfig config) {
         startPage();
@@ -51,6 +53,7 @@ public class SysConfigController extends BaseController {
      * 根据参数编号获取详细信息
      */
     @PreAuthorize("@ss.hasPermi('system:config:query')")
+    @Log(title = "参数管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping(value = "/{configId}")
     public AjaxResult getInfo(@PathVariable Long configId) {
         return success(configService.selectConfigById(configId));
@@ -60,6 +63,7 @@ public class SysConfigController extends BaseController {
      * 根据参数键名查询参数值
      */
     @GetMapping(value = "/configKey/{configKey}")
+    @Log(title = "参数管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult getConfigKey(@PathVariable String configKey) {
         return success(configService.selectConfigByKey(configKey));
     }
@@ -68,7 +72,7 @@ public class SysConfigController extends BaseController {
      * 新增参数配置
      */
     @PreAuthorize("@ss.hasPermi('system:config:add')")
-    @Log(title = "参数管理", businessType = BusinessType.INSERT)
+    @Log(title = "参数管理", businessType = BusinessType.INSERT, eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysConfig config) {
         if (!configService.checkConfigKeyUnique(config)) {
@@ -82,7 +86,7 @@ public class SysConfigController extends BaseController {
      * 修改参数配置
      */
     @PreAuthorize("@ss.hasPermi('system:config:edit')")
-    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
+    @Log(title = "参数管理", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysConfig config) {
         if (!configService.checkConfigKeyUnique(config)) {
@@ -96,7 +100,7 @@ public class SysConfigController extends BaseController {
      * 删除参数配置
      */
     @PreAuthorize("@ss.hasPermi('system:config:remove')")
-    @Log(title = "参数管理", businessType = BusinessType.DELETE)
+    @Log(title = "参数管理", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{configIds}")
     public AjaxResult remove(@PathVariable Long[] configIds) {
         configService.deleteConfigByIds(configIds);
@@ -107,7 +111,7 @@ public class SysConfigController extends BaseController {
      * 刷新参数缓存
      */
     @PreAuthorize("@ss.hasPermi('system:config:remove')")
-    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
+    @Log(title = "参数管理", businessType = BusinessType.CLEAN, eventLevel = EventLevel.HIGH)
     @DeleteMapping("/refreshCache")
     public AjaxResult refreshCache() {
         configService.resetConfigCache();

+ 7 - 3
doc-admin/src/main/java/com/doc/web/controller/system/SysDeptController.java

@@ -7,6 +7,7 @@ import com.doc.common.core.controller.BaseController;
 import com.doc.common.core.domain.AjaxResult;
 import com.doc.common.core.domain.entity.SysDept;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.StringUtils;
 import com.doc.system.service.ISysConfigService;
 import com.doc.system.service.ISysDeptService;
@@ -37,6 +38,7 @@ public class SysDeptController extends BaseController {
      * 获取部门列表
      */
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @Log(title = "部门管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/list")
     public AjaxResult list(SysDept dept) {
         List<SysDept> depts = deptService.selectDeptList(dept);
@@ -48,6 +50,7 @@ public class SysDeptController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list/exclude/{deptId}")
+    @Log(title = "部门管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
         List<SysDept> depts = deptService.selectDeptList(new SysDept());
         depts.removeIf(d -> d.getDeptId().intValue() == deptId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
@@ -59,6 +62,7 @@ public class SysDeptController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('system:dept:query')")
     @GetMapping(value = "/{deptId}")
+    @Log(title = "部门管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult getInfo(@PathVariable Long deptId) {
         deptService.checkDeptDataScope(deptId);
         return success(deptService.selectDeptById(deptId));
@@ -68,7 +72,7 @@ public class SysDeptController extends BaseController {
      * 新增部门
      */
     @PreAuthorize("@ss.hasPermi('system:dept:add')")
-    @Log(title = "部门管理", businessType = BusinessType.INSERT)
+    @Log(title = "部门管理", businessType = BusinessType.INSERT, eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysDept dept) {
         if (!deptService.checkDeptNameUnique(dept)) {
@@ -84,7 +88,7 @@ public class SysDeptController extends BaseController {
      * 修改部门
      */
     @PreAuthorize("@ss.hasPermi('system:dept:edit')")
-    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
+    @Log(title = "部门管理", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysDept dept) {
         Long deptId = dept.getDeptId();
@@ -107,7 +111,7 @@ public class SysDeptController extends BaseController {
      * 删除部门
      */
     @PreAuthorize("@ss.hasPermi('system:dept:remove')")
-    @Log(title = "部门管理", businessType = BusinessType.DELETE)
+    @Log(title = "部门管理", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{deptId}")
     public AjaxResult remove(@PathVariable Long deptId) {
         if (deptService.hasChildByDeptId(deptId)) {

+ 7 - 3
doc-admin/src/main/java/com/doc/web/controller/system/SysDictDataController.java

@@ -6,6 +6,7 @@ import com.doc.common.core.domain.AjaxResult;
 import com.doc.common.core.domain.entity.SysDictData;
 import com.doc.common.core.page.TableDataInfo;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.StringUtils;
 import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.system.service.ISysDictDataService;
@@ -34,6 +35,7 @@ public class SysDictDataController extends BaseController {
     private ISysDictTypeService dictTypeService;
 
     @PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @Log(title = "字典数据", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/list")
     public TableDataInfo list(SysDictData dictData) {
         startPage();
@@ -55,6 +57,7 @@ public class SysDictDataController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('system:dict:query')")
     @GetMapping(value = "/{dictCode}")
+    @Log(title = "字典数据", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult getInfo(@PathVariable Long dictCode) {
         return success(dictDataService.selectDictDataById(dictCode));
     }
@@ -63,6 +66,7 @@ public class SysDictDataController extends BaseController {
      * 根据字典类型查询字典数据信息
      */
     @GetMapping(value = "/type/{dictType}")
+    @Log(title = "字典数据", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult dictType(@PathVariable String dictType) {
         List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
         if (StringUtils.isNull(data)) {
@@ -75,7 +79,7 @@ public class SysDictDataController extends BaseController {
      * 新增字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:add')")
-    @Log(title = "字典数据", businessType = BusinessType.INSERT)
+    @Log(title = "字典数据", businessType = BusinessType.INSERT, eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysDictData dict) {
         dict.setCreateBy(getUsername());
@@ -86,7 +90,7 @@ public class SysDictDataController extends BaseController {
      * 修改保存字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:edit')")
-    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
+    @Log(title = "字典数据", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysDictData dict) {
         dict.setUpdateBy(getUsername());
@@ -97,7 +101,7 @@ public class SysDictDataController extends BaseController {
      * 删除字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
-    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @Log(title = "字典类型", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{dictCodes}")
     public AjaxResult remove(@PathVariable Long[] dictCodes) {
         dictDataService.deleteDictDataByIds(dictCodes);

+ 7 - 4
doc-admin/src/main/java/com/doc/web/controller/system/SysDictTypeController.java

@@ -6,6 +6,7 @@ import com.doc.common.core.domain.AjaxResult;
 import com.doc.common.core.domain.entity.SysDictType;
 import com.doc.common.core.page.TableDataInfo;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.system.service.ISysDictTypeService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,6 +30,7 @@ public class SysDictTypeController extends BaseController {
 
     @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
+    @Log(title = "字典类型", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public TableDataInfo list(SysDictType dictType) {
         startPage();
         List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
@@ -49,6 +51,7 @@ public class SysDictTypeController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('system:dict:query')")
     @GetMapping(value = "/{dictId}")
+    @Log(title = "字典类型", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public AjaxResult getInfo(@PathVariable Long dictId) {
         return success(dictTypeService.selectDictTypeById(dictId));
     }
@@ -57,7 +60,7 @@ public class SysDictTypeController extends BaseController {
      * 新增字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:add')")
-    @Log(title = "字典类型", businessType = BusinessType.INSERT)
+    @Log(title = "字典类型", businessType = BusinessType.INSERT,eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysDictType dict) {
         if (!dictTypeService.checkDictTypeUnique(dict)) {
@@ -71,7 +74,7 @@ public class SysDictTypeController extends BaseController {
      * 修改字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:edit')")
-    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
+    @Log(title = "字典类型", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysDictType dict) {
         if (!dictTypeService.checkDictTypeUnique(dict)) {
@@ -85,7 +88,7 @@ public class SysDictTypeController extends BaseController {
      * 删除字典类型
      */
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
-    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @Log(title = "字典类型", businessType = BusinessType.DELETE,eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{dictIds}")
     public AjaxResult remove(@PathVariable Long[] dictIds) {
         dictTypeService.deleteDictTypeByIds(dictIds);
@@ -96,7 +99,7 @@ public class SysDictTypeController extends BaseController {
      * 刷新字典缓存
      */
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
-    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN,eventLevel = EventLevel.HIGH)
     @DeleteMapping("/refreshCache")
     public AjaxResult refreshCache() {
         dictTypeService.resetDictCache();

+ 4 - 3
doc-admin/src/main/java/com/doc/web/controller/system/SysProfileController.java

@@ -9,6 +9,7 @@ import com.doc.common.core.domain.entity.SysUser;
 import com.doc.common.core.domain.entity.SysUserExpand;
 import com.doc.common.core.domain.model.LoginUser;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.SecurityUtils;
 import com.doc.common.utils.StringUtils;
 import com.doc.common.utils.file.FileUploadUtils;
@@ -58,7 +59,7 @@ public class SysProfileController extends BaseController {
     /**
      * 修改用户
      */
-    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE,eventLevel = EventLevel.MIDDLE)
     @PutMapping
     public AjaxResult updateProfile(@RequestBody SysUser user) {
         LoginUser loginUser = getLoginUser();
@@ -91,7 +92,7 @@ public class SysProfileController extends BaseController {
     /**
      * 重置密码
      */
-    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping("/updatePwd")
     public AjaxResult updatePwd(String oldPassword, String newPassword) {
         LoginUser loginUser = getLoginUser();
@@ -122,7 +123,7 @@ public class SysProfileController extends BaseController {
     /**
      * 头像上传
      */
-    @Log(title = "用户头像", businessType = BusinessType.UPDATE)
+    @Log(title = "用户头像", businessType = BusinessType.UPDATE,eventLevel = EventLevel.MIDDLE)
     @PostMapping("/avatar")
     public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws Exception {
         if (!file.isEmpty()) {

+ 9 - 8
doc-admin/src/main/java/com/doc/web/controller/system/SysRoleController.java

@@ -9,6 +9,7 @@ import com.doc.common.core.domain.entity.SysUser;
 import com.doc.common.core.domain.model.LoginUser;
 import com.doc.common.core.page.TableDataInfo;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.StringUtils;
 import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.framework.web.service.SysPermissionService;
@@ -79,7 +80,7 @@ public class SysRoleController extends BaseController {
      * 新增角色
      */
     @PreAuthorize("@ss.hasPermi('system:role:add')")
-    @Log(title = "角色管理", businessType = BusinessType.INSERT)
+    @Log(title = "角色管理", businessType = BusinessType.INSERT,eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysRole role) {
         if (!roleService.checkRoleNameUnique(role)) {
@@ -96,7 +97,7 @@ public class SysRoleController extends BaseController {
      * 修改保存角色
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysRole role) {
         roleService.checkRoleAllowed(role);
@@ -125,7 +126,7 @@ public class SysRoleController extends BaseController {
      * 修改保存数据权限
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping("/dataScope")
     public AjaxResult dataScope(@RequestBody SysRole role) {
         roleService.checkRoleAllowed(role);
@@ -137,7 +138,7 @@ public class SysRoleController extends BaseController {
      * 状态修改
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping("/changeStatus")
     public AjaxResult changeStatus(@RequestBody SysRole role) {
         roleService.checkRoleAllowed(role);
@@ -150,7 +151,7 @@ public class SysRoleController extends BaseController {
      * 删除角色
      */
     @PreAuthorize("@ss.hasPermi('system:role:remove')")
-    @Log(title = "角色管理", businessType = BusinessType.DELETE)
+    @Log(title = "角色管理", businessType = BusinessType.DELETE,eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{roleIds}")
     public AjaxResult remove(@PathVariable Long[] roleIds) {
         return toAjax(roleService.deleteRoleByIds(roleIds));
@@ -191,7 +192,7 @@ public class SysRoleController extends BaseController {
      * 取消授权用户
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @Log(title = "角色管理", businessType = BusinessType.GRANT,eventLevel = EventLevel.HIGH)
     @PutMapping("/authUser/cancel")
     public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) {
         return toAjax(roleService.deleteAuthUser(userRole));
@@ -201,7 +202,7 @@ public class SysRoleController extends BaseController {
      * 批量取消授权用户
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @Log(title = "角色管理", businessType = BusinessType.GRANT,eventLevel = EventLevel.HIGH)
     @PutMapping("/authUser/cancelAll")
     public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) {
         return toAjax(roleService.deleteAuthUsers(roleId, userIds));
@@ -211,7 +212,7 @@ public class SysRoleController extends BaseController {
      * 批量选择用户授权
      */
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
-    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @Log(title = "角色管理", businessType = BusinessType.GRANT,eventLevel = EventLevel.HIGH)
     @PutMapping("/authUser/selectAll")
     public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) {
         roleService.checkRoleDataScope(roleId);

+ 10 - 8
doc-admin/src/main/java/com/doc/web/controller/system/SysUserController.java

@@ -1,7 +1,6 @@
 package com.doc.web.controller.system;
 
 import com.doc.biz.service.IDocSpaceService;
-import com.doc.common.annotation.DataScope;
 import com.doc.common.annotation.Log;
 import com.doc.common.core.controller.BaseController;
 import com.doc.common.core.domain.AjaxResult;
@@ -62,6 +61,7 @@ public class SysUserController extends BaseController {
      * 获取用户列表
      */
     @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @Log(title = "用户管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/list")
     public TableDataInfo list(SysUser user) {
         startPage();
@@ -71,6 +71,7 @@ public class SysUserController extends BaseController {
 
     @ApiOperation("获取用户基本信息")
     @GetMapping(value = {"/info/{userId}"})
+    @Log(title = "用户管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public UserVO info(@PathVariable(value = "userId", required = false) Long userId) {
         SysUser sysUser = userService.selectUserById(userId);
         UserVO vo = new UserVO();
@@ -82,6 +83,7 @@ public class SysUserController extends BaseController {
      * 获取用户树
      */
     @ApiOperation("获取用户树")
+    @Log(title = "用户管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/tree")
     public UserTreeVO tree() {
         List<SysDept> deptList = deptService.selectAllDeptList();
@@ -95,9 +97,8 @@ public class SysUserController extends BaseController {
      */
     @ApiOperation("获取本部门下用户树")
     @GetMapping("/tree4dept")
+    @Log(title = "用户管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     public UserTreeVO tree4dept() {
-//        SysDept dept = new SysDept();
-//        dept.setDeptId(SecurityUtils.getDeptId());
         List<SysDept> deptList = deptService.selectDeptList(new SysDept());
         List<SysDept> list = deptService.buildDeptTree(deptList);
         SysDept tree = list.get(0);
@@ -214,7 +215,7 @@ public class SysUserController extends BaseController {
      * 修改用户
      */
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody SysUser user) {
         userService.checkUserAllowed(user);
@@ -237,7 +238,7 @@ public class SysUserController extends BaseController {
      * 删除用户
      */
     @PreAuthorize("@ss.hasPermi('system:user:remove')")
-    @Log(title = "用户管理", businessType = BusinessType.DELETE)
+    @Log(title = "用户管理", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
     @DeleteMapping("/{userIds}")
     public AjaxResult remove(@PathVariable Long[] userIds) {
         if (ArrayUtils.contains(userIds, getUserId())) {
@@ -250,7 +251,7 @@ public class SysUserController extends BaseController {
      * 重置密码
      */
     @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping("/resetPwd")
     public AjaxResult resetPwd(@RequestBody SysUser user) {
         userService.checkUserAllowed(user);
@@ -264,7 +265,7 @@ public class SysUserController extends BaseController {
      * 状态修改
      */
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
-    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE, eventLevel = EventLevel.HIGH)
     @PutMapping("/changeStatus")
     public AjaxResult changeStatus(@RequestBody SysUser user) {
         userService.checkUserAllowed(user);
@@ -291,7 +292,7 @@ public class SysUserController extends BaseController {
      * 用户授权角色
      */
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
-    @Log(title = "用户管理", businessType = BusinessType.GRANT)
+    @Log(title = "用户管理", businessType = BusinessType.GRANT, eventLevel = EventLevel.HIGH)
     @PutMapping("/authRole")
     public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
         userService.checkUserDataScope(userId);
@@ -303,6 +304,7 @@ public class SysUserController extends BaseController {
      * 获取部门树列表
      */
     @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @Log(title = "用户管理", businessType = BusinessType.SEARCH, isSaveResponseData = false)
     @GetMapping("/deptTree")
     public AjaxResult deptTree(SysDept dept) {
         return success(deptService.selectDeptTreeList(dept));

+ 3 - 2
doc-admin/src/main/java/com/doc/web/controller/system/SysUserExpandController.java

@@ -6,6 +6,7 @@ import com.doc.common.core.domain.AjaxResult;
 import com.doc.common.core.domain.entity.SysUserExpand;
 import com.doc.common.core.page.TableDataInfo;
 import com.doc.common.enums.BusinessType;
+import com.doc.common.enums.EventLevel;
 import com.doc.common.utils.poi.ExcelUtil;
 import com.doc.system.service.ISysUserExpandService;
 import io.swagger.annotations.Api;
@@ -70,7 +71,7 @@ public class SysUserExpandController extends BaseController {
      */
     @ApiOperation("新增用户登录限制")
     @PreAuthorize("@ss.hasPermi('system:expand:add')")
-    @Log(title = "用户登录限制", businessType = BusinessType.INSERT)
+    @Log(title = "用户登录限制", businessType = BusinessType.INSERT,eventLevel = EventLevel.HIGH)
     @PostMapping
     public AjaxResult add(@RequestBody SysUserExpand sysUserExpand) {
         return toAjax(sysUserExpandService.insertSysUserExpand(sysUserExpand));
@@ -81,7 +82,7 @@ public class SysUserExpandController extends BaseController {
      */
     @ApiOperation("修改用户登录限制")
     @PreAuthorize("@ss.hasPermi('system:expand:edit')")
-    @Log(title = "用户登录限制", businessType = BusinessType.UPDATE)
+    @Log(title = "用户登录限制", businessType = BusinessType.UPDATE,eventLevel = EventLevel.HIGH)
     @PutMapping
     public AjaxResult edit(@RequestBody SysUserExpand sysUserExpand) {
         return toAjax(sysUserExpandService.updateSysUserExpand(sysUserExpand));

+ 4 - 0
doc-common/src/main/java/com/doc/common/annotation/Log.java

@@ -9,8 +9,12 @@ import java.lang.annotation.*;
 
 /**
  * 自定义操作日志记录注解
+ * 使用说明
  *
  * @author ruoyi
+ * *** @Log(title = "用户管理", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
+ * eventLevel 默认为LOW ,eventType默认为BUSINESS ,
+ * 当level和type为默认值的时候,可以不写
  */
 @Target({ElementType.PARAMETER, ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)

+ 7 - 4
doc-common/src/main/java/com/doc/common/enums/BusinessType.java

@@ -2,11 +2,10 @@ package com.doc.common.enums;
 
 /**
  * 业务操作类型
- * 
+ *
  * @author ruoyi
  */
-public enum BusinessType
-{
+public enum BusinessType {
     /**
      * 其它
      */
@@ -51,9 +50,13 @@ public enum BusinessType
      * 生成代码
      */
     GENCODE,
-    
+
     /**
      * 清空数据
      */
     CLEAN,
+    /**
+     * 查询
+     */
+    SEARCH,
 }