feat(core): 完善日志切面并优化日志实体
- 在 LogAspect 中添加了请求参数和响应内容的记录 - 增加 Log 实体类的字段
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package com.youlai.boot.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.youlai.boot.common.enums.LogModuleEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.youlai.boot.common.enums.LogModuleEnum;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 系统日志 实体类
|
||||
*
|
||||
@@ -17,72 +17,57 @@ import lombok.Data;
|
||||
@TableName("sys_log")
|
||||
@Data
|
||||
public class Log implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
@Schema(description = "主键")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 日志模块
|
||||
*/
|
||||
@Schema(description = "日志模块")
|
||||
private LogModuleEnum module;
|
||||
|
||||
@Schema(description = "请求方式")
|
||||
@TableField(value = "request_method")
|
||||
private String requestMethod;
|
||||
|
||||
/**
|
||||
* 日志内容
|
||||
*/
|
||||
@Schema(description = "请求参数")
|
||||
@TableField(value = "request_params")
|
||||
private String requestParams;
|
||||
|
||||
@Schema(description = "响应参数")
|
||||
@TableField(value = "response_content")
|
||||
private String responseContent;
|
||||
|
||||
@Schema(description = "日志内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 请求路径
|
||||
*/
|
||||
@Schema(description = "请求路径")
|
||||
private String requestUri;
|
||||
|
||||
/**
|
||||
* IP 地址
|
||||
*/
|
||||
@Schema(description = "IP 地址")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@Schema(description = "省份")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Schema(description = "城市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 浏览器
|
||||
*/
|
||||
@Schema(description = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 浏览器版本
|
||||
*/
|
||||
@Schema(description = "浏览器版本")
|
||||
private String browserVersion;
|
||||
|
||||
/**
|
||||
* 终端系统
|
||||
*/
|
||||
@Schema(description = "终端系统")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 执行时间(毫秒)
|
||||
*/
|
||||
@Schema(description = "执行时间(毫秒)")
|
||||
private Long executionTime;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
@Schema(description = "创建人ID")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user