mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.Arrays;
|
||||
public class ControllerAop {
|
||||
|
||||
|
||||
@Pointcut("execution (* cn.lihongjie.coal.controller.*.*(..))")
|
||||
@Pointcut("execution (* cn.lihongjie.coal.*.controller.*.*(..))")
|
||||
public void controllerMethods() {
|
||||
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class ControllerAop {
|
||||
|
||||
private static void updateSysLog(Throwable e, SysLogEntity sysLogEntity) {
|
||||
if (sysLogEntity != null) {
|
||||
sysLogEntity.setStatus("1");
|
||||
sysLogEntity.setOptStatus("1");
|
||||
sysLogEntity.setStacktrace(ExceptionUtils.getStackTrace(e));
|
||||
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class ControllerAop {
|
||||
sysLogEntity.setIp(RequestUtils.getIp(request));
|
||||
sysLogEntity.setIpLocation(RequestUtils.getIp(request));
|
||||
sysLogEntity.setUrl(request.getRequestURI());
|
||||
sysLogEntity.setStatus("0");
|
||||
sysLogEntity.setOptStatus("0");
|
||||
sysLogEntity.setTimeCost(0);
|
||||
sysLogEntity.setUserAgent(RequestUtils.getUa(request));
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BaseEntity {
|
||||
private String createUserId;
|
||||
|
||||
|
||||
@Formula("(select name from t_user where id = create_user_id)")
|
||||
@Formula("(select tu.name from t_user tu where tu.id = create_user_id)")
|
||||
private String createUserName;
|
||||
|
||||
@Comment("创建时间")
|
||||
@@ -36,7 +36,7 @@ public class BaseEntity {
|
||||
|
||||
@Comment("更新用户ID")
|
||||
private String updateUserId;
|
||||
@Formula("((select name from t_user where id = create_user_id))")
|
||||
@Formula("((select tu.name from t_user tu where tu.id = create_user_id))")
|
||||
private String updateUserName;
|
||||
|
||||
@Comment("更新时间")
|
||||
|
||||
@@ -10,7 +10,6 @@ public class CreateSysLogDto extends OrgCommonDto
|
||||
|
||||
@Comment("ip")
|
||||
private String ip;
|
||||
private String statusName;
|
||||
@Comment("模块")
|
||||
private String module;
|
||||
@Comment("操作")
|
||||
@@ -34,9 +33,11 @@ public class CreateSysLogDto extends OrgCommonDto
|
||||
private String url;
|
||||
|
||||
|
||||
@Comment("操作状态 0 成功 1 失败")
|
||||
private Integer status;
|
||||
|
||||
@Comment("错误堆栈")
|
||||
private String stacktrace;
|
||||
|
||||
|
||||
private String optStatus;
|
||||
private String optStatusName;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import org.hibernate.annotations.Comment;
|
||||
public class SysLogDto extends OrgCommonDto
|
||||
{
|
||||
|
||||
private String optStatus;
|
||||
private String optStatusName;
|
||||
@Comment("ip")
|
||||
private String ip;
|
||||
|
||||
@@ -34,12 +36,9 @@ public class SysLogDto extends OrgCommonDto
|
||||
private String url;
|
||||
|
||||
|
||||
@Comment("操作状态 0 成功 1 失败")
|
||||
private Integer status;
|
||||
|
||||
@Comment("错误堆栈")
|
||||
private String stacktrace;
|
||||
|
||||
private String statusName;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ public class UpdateSysLogDto extends OrgCommonDto
|
||||
|
||||
@Comment("ip")
|
||||
private String ip;
|
||||
private String statusName;
|
||||
@Comment("模块")
|
||||
private String module;
|
||||
@Comment("操作")
|
||||
@@ -35,10 +34,12 @@ public class UpdateSysLogDto extends OrgCommonDto
|
||||
private String url;
|
||||
|
||||
|
||||
@Comment("操作状态 0 成功 1 失败")
|
||||
private Integer status;
|
||||
|
||||
@Comment("错误堆栈")
|
||||
private String stacktrace;
|
||||
|
||||
|
||||
private String optStatus;
|
||||
private String optStatusName;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,15 +38,15 @@ public class SysLogEntity extends OrgBaseEntity {
|
||||
|
||||
|
||||
@Comment("操作状态 0 成功 1 失败")
|
||||
private String status;
|
||||
private String optStatus;
|
||||
|
||||
@Formula("(select i.name\n" +
|
||||
"from t_dictionary d,\n" +
|
||||
" t_dictionary_item i\n" +
|
||||
"where d.id = i.dictionary_id\n" +
|
||||
" and d.code = 'syslog.status'\n" +
|
||||
" and i.code = status)")
|
||||
private String statusName;
|
||||
" and i.code = opt_status)")
|
||||
private String optStatusName;
|
||||
|
||||
|
||||
@Comment("错误堆栈")
|
||||
|
||||
Reference in New Issue
Block a user