系统级别错误日志
This commit is contained in:
parent
627d492f69
commit
f433170cdd
|
|
@ -0,0 +1,164 @@
|
|||
package com.nu.modules.errorrecordlog.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_error_record_log")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_error_record_log对象", description="nu_error_record_log")
|
||||
public class ErrorRecordLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键ID*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private String id;
|
||||
/**功能模块(如:用户管理、订单导入)*/
|
||||
@Excel(name = "功能模块(如:用户管理、订单导入)", width = 15)
|
||||
@ApiModelProperty(value = "功能模块(如:用户管理、订单导入)")
|
||||
private String functionModule;
|
||||
/**具体环节(如:新增用户、Excel解析)*/
|
||||
@Excel(name = "具体环节(如:新增用户、Excel解析)", width = 15)
|
||||
@ApiModelProperty(value = "具体环节(如:新增用户、Excel解析)")
|
||||
private String functionAction;
|
||||
/**方法路径*/
|
||||
@Excel(name = "方法路径", width = 15)
|
||||
@ApiModelProperty(value = "方法路径")
|
||||
private String functionPath;
|
||||
/**错误简介*/
|
||||
@Excel(name = "错误简介", width = 15)
|
||||
@ApiModelProperty(value = "错误简介")
|
||||
private String errorBrief;
|
||||
/**错误详细信息(堆栈或完整描述)*/
|
||||
@Excel(name = "错误详细信息(堆栈或完整描述)", width = 15)
|
||||
@ApiModelProperty(value = "错误详细信息(堆栈或完整描述)")
|
||||
private String errorDetail;
|
||||
/**业务数据ID(如订单ID、用户ID)*/
|
||||
@Excel(name = "业务数据ID(如订单ID、用户ID)", width = 15)
|
||||
@ApiModelProperty(value = "业务数据ID(如订单ID、用户ID)")
|
||||
private String businessId;
|
||||
/**业务数据快照(出错时的数据内容)*/
|
||||
@Excel(name = "业务数据快照(出错时的数据内容)", width = 15)
|
||||
@ApiModelProperty(value = "业务数据快照(出错时的数据内容)")
|
||||
private String businessData;
|
||||
/**错误类型(系统异常/业务异常/参数校验)*/
|
||||
@Excel(name = "错误类型(系统异常/业务异常/参数校验)", width = 15)
|
||||
@ApiModelProperty(value = "错误类型(系统异常/业务异常/参数校验)")
|
||||
private String errorType;
|
||||
/**错误码*/
|
||||
@Excel(name = "错误码", width = 15)
|
||||
@ApiModelProperty(value = "错误码")
|
||||
private String errorCode;
|
||||
/**错误级别:1-提示,2-警告,3-严重,4-致命*/
|
||||
@Excel(name = "错误级别:1-提示,2-警告,3-严重,4-致命", width = 15)
|
||||
@ApiModelProperty(value = "错误级别:1-提示,2-警告,3-严重,4-致命")
|
||||
private Integer errorLevel;
|
||||
/**已重试次数*/
|
||||
@Excel(name = "已重试次数", width = 15)
|
||||
@ApiModelProperty(value = "已重试次数")
|
||||
private Integer retryCount;
|
||||
/**最大重试次数*/
|
||||
@Excel(name = "最大重试次数", width = 15)
|
||||
@ApiModelProperty(value = "最大重试次数")
|
||||
private Integer maxRetryCount;
|
||||
/**处理状态:0-待处理,1-处理中,2-已解决,3-无需处理,4-重试失败*/
|
||||
@Excel(name = "处理状态:0-待处理,1-处理中,2-已解决,3-无需处理,4-重试失败", width = 15)
|
||||
@ApiModelProperty(value = "处理状态:0-待处理,1-处理中,2-已解决,3-无需处理,4-重试失败")
|
||||
private Integer handleStatus;
|
||||
/**处理结果/备注*/
|
||||
@Excel(name = "处理结果/备注", width = 15)
|
||||
@ApiModelProperty(value = "处理结果/备注")
|
||||
private String handleResult;
|
||||
/**处理人*/
|
||||
@Excel(name = "处理人", width = 15)
|
||||
@ApiModelProperty(value = "处理人")
|
||||
private String handler;
|
||||
/**处理时间*/
|
||||
@Excel(name = "处理时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
private Date handleTime;
|
||||
/**请求URL*/
|
||||
@Excel(name = "请求URL", width = 15)
|
||||
@ApiModelProperty(value = "请求URL")
|
||||
private String requestUrl;
|
||||
/**请求方法*/
|
||||
@Excel(name = "请求方法", width = 15)
|
||||
@ApiModelProperty(value = "请求方法")
|
||||
private String requestMethod;
|
||||
/**请求参数*/
|
||||
@Excel(name = "请求参数", width = 15)
|
||||
@ApiModelProperty(value = "请求参数")
|
||||
private String requestParams;
|
||||
/**客户端IP*/
|
||||
@Excel(name = "客户端IP", width = 15)
|
||||
@ApiModelProperty(value = "客户端IP")
|
||||
private String ipAddress;
|
||||
/**用户代理*/
|
||||
@Excel(name = "用户代理", width = 15)
|
||||
@ApiModelProperty(value = "用户代理")
|
||||
private String userAgent;
|
||||
/**环境:dev/test/prod*/
|
||||
@Excel(name = "环境:dev/test/prod", width = 15)
|
||||
@ApiModelProperty(value = "环境:dev/test/prod")
|
||||
private String env;
|
||||
/**应用版本*/
|
||||
@Excel(name = "应用版本", width = 15)
|
||||
@ApiModelProperty(value = "应用版本")
|
||||
private String version;
|
||||
/**机构名称*/
|
||||
@Excel(name = "机构名称", width = 15)
|
||||
@ApiModelProperty(value = "机构名称")
|
||||
private String orgName;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private String orgCode;
|
||||
/**创建人(操作人)*/
|
||||
@ApiModelProperty(value = "创建人(操作人)")
|
||||
private String createBy;
|
||||
/**创建时间(错误发生时间)*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间(错误发生时间)")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
/**删除标识(0-正常,1-已删除)*/
|
||||
@Excel(name = "删除标识(0-正常,1-已删除)", width = 15)
|
||||
@ApiModelProperty(value = "删除标识(0-正常,1-已删除)")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.errorrecordlog.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.errorrecordlog.entity.ErrorRecordLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ErrorRecordLogMapper extends BaseMapper<ErrorRecordLog> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.errorrecordlog.mapper.ErrorRecordLogMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.errorrecordlog.service;
|
||||
|
||||
import com.nu.modules.errorrecordlog.entity.ErrorRecordLog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IErrorRecordLogService extends IService<ErrorRecordLog> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.errorrecordlog.service.impl;
|
||||
|
||||
import com.nu.modules.errorrecordlog.entity.ErrorRecordLog;
|
||||
import com.nu.modules.errorrecordlog.mapper.ErrorRecordLogMapper;
|
||||
import com.nu.modules.errorrecordlog.service.IErrorRecordLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ErrorRecordLogServiceImpl extends ServiceImpl<ErrorRecordLogMapper, ErrorRecordLog> implements IErrorRecordLogService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ErrorRecordLogMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键ID*/
|
||||
private String id;
|
||||
/**功能模块(如:用户管理、订单导入)*/
|
||||
private String functionModule;
|
||||
/**具体环节(如:新增用户、Excel解析)*/
|
||||
private String functionAction;
|
||||
/**方法路径*/
|
||||
private String functionPath;
|
||||
/**错误简介*/
|
||||
private String errorBrief;
|
||||
/**错误详细信息(堆栈或完整描述)*/
|
||||
private String errorDetail;
|
||||
/**业务数据ID(如订单ID、用户ID)*/
|
||||
private String businessId;
|
||||
/**业务数据快照(出错时的数据内容)*/
|
||||
private String businessData;
|
||||
/**错误类型(系统异常/业务异常/参数校验)*/
|
||||
private String errorType;
|
||||
/**错误码*/
|
||||
private String errorCode;
|
||||
/**错误级别:1-提示,2-警告,3-严重,4-致命*/
|
||||
private Integer errorLevel;
|
||||
/**已重试次数*/
|
||||
private Integer retryCount;
|
||||
/**最大重试次数*/
|
||||
private Integer maxRetryCount;
|
||||
/**处理状态:0-待处理,1-处理中,2-已解决,3-无需处理,4-重试失败*/
|
||||
private Integer handleStatus;
|
||||
/**处理结果/备注*/
|
||||
private String handleResult;
|
||||
/**处理人*/
|
||||
private String handler;
|
||||
/**处理时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date handleTime;
|
||||
/**请求URL*/
|
||||
private String requestUrl;
|
||||
/**请求方法*/
|
||||
private String requestMethod;
|
||||
/**请求参数*/
|
||||
private String requestParams;
|
||||
/**客户端IP*/
|
||||
private String ipAddress;
|
||||
/**用户代理*/
|
||||
private String userAgent;
|
||||
/**环境:dev/test/prod*/
|
||||
private String env;
|
||||
/**应用版本*/
|
||||
private String version;
|
||||
/**机构名称*/
|
||||
private String orgName;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**创建人(操作人)*/
|
||||
private String createBy;
|
||||
/**创建时间(错误发生时间)*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**删除标识(0-正常,1-已删除)*/
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: nu_error_record_log
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ErrorRecordLogEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键ID*/
|
||||
private String id;
|
||||
/**功能模块(如:用户管理、订单导入)*/
|
||||
private String functionModule;
|
||||
/**具体环节(如:新增用户、Excel解析)*/
|
||||
private String functionAction;
|
||||
/**方法路径*/
|
||||
private String functionPath;
|
||||
/**错误简介*/
|
||||
private String errorBrief;
|
||||
/**错误详细信息(堆栈或完整描述)*/
|
||||
private String errorDetail;
|
||||
/**业务数据ID(如订单ID、用户ID)*/
|
||||
private String businessId;
|
||||
/**业务数据快照(出错时的数据内容)*/
|
||||
private String businessData;
|
||||
/**错误类型(系统异常/业务异常/参数校验)*/
|
||||
private String errorType;
|
||||
/**错误码*/
|
||||
private String errorCode;
|
||||
/**错误级别:1-提示,2-警告,3-严重,4-致命*/
|
||||
private Integer errorLevel;
|
||||
/**已重试次数*/
|
||||
private Integer retryCount;
|
||||
/**最大重试次数*/
|
||||
private Integer maxRetryCount;
|
||||
/**处理状态:0-待处理,1-处理中,2-已解决,3-无需处理,4-重试失败*/
|
||||
private Integer handleStatus;
|
||||
/**处理结果/备注*/
|
||||
private String handleResult;
|
||||
/**处理人*/
|
||||
private String handler;
|
||||
/**处理时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date handleTime;
|
||||
/**请求URL*/
|
||||
private String requestUrl;
|
||||
/**请求方法*/
|
||||
private String requestMethod;
|
||||
/**请求参数*/
|
||||
private String requestParams;
|
||||
/**客户端IP*/
|
||||
private String ipAddress;
|
||||
/**用户代理*/
|
||||
private String userAgent;
|
||||
/**环境:dev/test/prod*/
|
||||
private String env;
|
||||
/**应用版本*/
|
||||
private String version;
|
||||
/**机构名称*/
|
||||
private String orgName;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**创建人(操作人)*/
|
||||
private String createBy;
|
||||
/**创建时间(错误发生时间)*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**删除标识(0-正常,1-已删除)*/
|
||||
private Integer delFlag;
|
||||
}
|
||||
Loading…
Reference in New Issue