diff --git a/len-sys/src/main/java/com/len/controller/UserController.java b/len-sys/src/main/java/com/len/controller/UserController.java index f0fff33..7420978 100644 --- a/len-sys/src/main/java/com/len/controller/UserController.java +++ b/len-sys/src/main/java/com/len/controller/UserController.java @@ -124,7 +124,7 @@ public class UserController extends BaseController{ } @ApiOperation(value = "/updateUser", httpMethod = "POST", notes = "更新用户") - @Log(desc = "更新用户") + @Log(desc = "更新用户",type = LOG_TYPE.UPDATE) @PostMapping(value = "updateUser") @ResponseBody public JsonUtil updateUser(SysUser user,String role[]) { diff --git a/len-sys/src/main/java/com/len/core/annotation/LogAspect.java b/len-sys/src/main/java/com/len/core/annotation/LogAspect.java index 57f96e7..cf740a8 100644 --- a/len-sys/src/main/java/com/len/core/annotation/LogAspect.java +++ b/len-sys/src/main/java/com/len/core/annotation/LogAspect.java @@ -1,5 +1,6 @@ package com.len.core.annotation; +import com.alibaba.fastjson.JSON; import com.len.base.CurrentUser; import com.len.core.shiro.ShiroUtil; import com.len.entity.SysLog; @@ -53,6 +54,17 @@ public class LogAspect { log.setCreateTime(new Date()); log.setType(type.toString()); log.setText(text); + + Object[] obj= jp.getArgs(); + StringBuffer buffer=new StringBuffer(); + if(obj!=null){ + for(int i=0;i{{ layui.laytpl.toDateString(d.createTime,"yyyy-MM-dd HH:mm:ss") }}'} + , {field: 'type', title: '操作类型', width: '5%', sort: true} + , {field: 'text', title: '描述内容', width: '10%', sort: true} + , {field: 'param', title: '参数', width: '45%', sort: true} + , {field: 'createTime', title: '操作时间', width: '10%',templet: '
{{ layui.laytpl.toDateString(d.createTime,"yyyy-MM-dd HH:mm:ss") }}
'} , {field: 'text', title: '操作', width: '20%', toolbar:'#toolBar'} ]] diff --git a/len-web/src/main/resources/mapper/SysLogMapper.xml b/len-web/src/main/resources/mapper/SysLogMapper.xml index 047c8cf..aa53e59 100644 --- a/len-web/src/main/resources/mapper/SysLogMapper.xml +++ b/len-web/src/main/resources/mapper/SysLogMapper.xml @@ -7,10 +7,11 @@ + - id, user_name, ip, type, text, create_time + id, user_name, ip, type, text, param, create_time