mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-14 10:57:19 +08:00
重构:🔥 基于阿里巴巴 Java 开发手册(黄山版)重构各表基本结构(简化列名)
1.MySQL数据库>建表规约>第9条: 【强制】表必备三字段:id,create_time,update_time。 说明:其中 id 必为主键,类型为 bigint unsigned、单表时自增、步长为 1。create_time,update_time 的类型均为datetime 类型,如果要记录时区信息,那么类型设置为 timestamp。 个人理解:简化列名的目的是为了后续能抽取更多公共能力 2.MySQL数据库>SQL语句>第10条: 【推荐】SQL 语句中表的别名前加 as,并且以 t1、t2、t3、...的顺序依次命名。 说明: 1)别名可以是表的简称,或者是依照表在 SQL 语句中出现的顺序,以 t1、t2、t3 的方式命名。 2)别名前加 as 使别名更容易识别。 正例:select t1.name from first_table as t1 , second_table as t2 where t1.id = t2.id;
This commit is contained in:
@@ -39,10 +39,10 @@ public class LogDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志 ID
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private Long logId;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 日志描述
|
||||
@@ -95,7 +95,7 @@ public class LogDO implements Serializable {
|
||||
private Long elapsedTime;
|
||||
|
||||
/**
|
||||
* 操作状态(1成功 2失败)
|
||||
* 操作状态(1:成功,2:失败)
|
||||
*/
|
||||
private LogStatusEnum status;
|
||||
|
||||
|
@@ -43,9 +43,9 @@ public class LoginLogQuery implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 登录状态(1成功 2失败)
|
||||
* 登录状态(1:成功,2:失败)
|
||||
*/
|
||||
@Schema(description = "登录状态(1成功 2失败)")
|
||||
@Schema(description = "登录状态(1:成功,2:失败)")
|
||||
@Query
|
||||
private Integer status;
|
||||
|
||||
|
@@ -42,13 +42,6 @@ public class OperationLogQuery implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
@Schema(description = "操作人")
|
||||
@Query(property = "createUser")
|
||||
private Long uid;
|
||||
|
||||
/**
|
||||
* 操作内容
|
||||
*/
|
||||
@@ -57,9 +50,9 @@ public class OperationLogQuery implements Serializable {
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 操作状态(1成功 2失败)
|
||||
* 操作状态(1:成功,2:失败)
|
||||
*/
|
||||
@Schema(description = "操作状态(1成功 2失败)")
|
||||
@Schema(description = "操作状态(1:成功,2:失败)")
|
||||
@Query
|
||||
private Integer status;
|
||||
|
||||
@@ -70,4 +63,11 @@ public class OperationLogQuery implements Serializable {
|
||||
@Query(type = Query.Type.BETWEEN)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private List<Date> createTime;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
@Schema(description = "操作人")
|
||||
@Query(property = "createUser")
|
||||
private Long uid;
|
||||
}
|
||||
|
@@ -36,6 +36,12 @@ public class LogVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
@@ -35,21 +35,15 @@ public class LoginLogVO extends LogVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志 ID
|
||||
* 登录行为
|
||||
*/
|
||||
@Schema(description = "日志 ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 日志描述
|
||||
*/
|
||||
@Schema(description = "日志描述")
|
||||
@Schema(description = "登录行为")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 操作状态(1成功 2失败)
|
||||
* 登录状态(1:成功,2:失败)
|
||||
*/
|
||||
@Schema(description = "操作状态(1成功 2失败)", type = "Integer", allowableValues = {"1", "2"})
|
||||
@Schema(description = "登录状态(1:成功,2:失败)", type = "Integer", allowableValues = {"1", "2"})
|
||||
private LogStatusEnum status;
|
||||
|
||||
/**
|
||||
|
@@ -34,12 +34,6 @@ public class OperationLogVO extends LogVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志 ID
|
||||
*/
|
||||
@Schema(description = "日志 ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 操作内容
|
||||
*/
|
||||
@@ -55,7 +49,7 @@ public class OperationLogVO extends LogVO {
|
||||
/**
|
||||
* 操作状态(1成功 2失败)
|
||||
*/
|
||||
@Schema(description = "操作状态(1成功 2失败)", type = "Integer", allowableValues = {"1", "2"})
|
||||
@Schema(description = "操作状态(1:成功,2:失败)", type = "Integer", allowableValues = {"1", "2"})
|
||||
private LogStatusEnum status;
|
||||
|
||||
/**
|
||||
|
@@ -33,22 +33,10 @@ public class SystemLogDetailVO extends LogVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志 ID
|
||||
* 状态码
|
||||
*/
|
||||
@Schema(description = "日志 ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 日志描述
|
||||
*/
|
||||
@Schema(description = "日志描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 请求URL
|
||||
*/
|
||||
@Schema(description = "请求URL")
|
||||
private String requestUrl;
|
||||
@Schema(description = "状态码")
|
||||
private Integer statusCode;
|
||||
|
||||
/**
|
||||
* 请求方式
|
||||
@@ -56,6 +44,12 @@ public class SystemLogDetailVO extends LogVO {
|
||||
@Schema(description = "请求方式")
|
||||
private String requestMethod;
|
||||
|
||||
/**
|
||||
* 请求 URL
|
||||
*/
|
||||
@Schema(description = "请求 URL")
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 请求头
|
||||
*/
|
||||
@@ -68,12 +62,6 @@ public class SystemLogDetailVO extends LogVO {
|
||||
@Schema(description = "请求体")
|
||||
private String requestBody;
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*/
|
||||
@Schema(description = "状态码")
|
||||
private Integer statusCode;
|
||||
|
||||
/**
|
||||
* 响应头
|
||||
*/
|
||||
@@ -86,12 +74,6 @@ public class SystemLogDetailVO extends LogVO {
|
||||
@Schema(description = "响应体")
|
||||
private String responseBody;
|
||||
|
||||
/**
|
||||
* 请求耗时(ms)
|
||||
*/
|
||||
@Schema(description = "请求耗时(ms)")
|
||||
private Long elapsedTime;
|
||||
|
||||
/**
|
||||
* 客户端IP
|
||||
*/
|
||||
@@ -109,4 +91,10 @@ public class SystemLogDetailVO extends LogVO {
|
||||
*/
|
||||
@Schema(description = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 请求耗时(ms)
|
||||
*/
|
||||
@Schema(description = "请求耗时(ms)")
|
||||
private Long elapsedTime;
|
||||
}
|
||||
|
@@ -32,18 +32,6 @@ public class SystemLogVO extends LogVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日志 ID
|
||||
*/
|
||||
@Schema(description = "日志 ID")
|
||||
private Long logId;
|
||||
|
||||
/**
|
||||
* 日志描述
|
||||
*/
|
||||
@Schema(description = "日志描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*/
|
||||
@@ -57,17 +45,11 @@ public class SystemLogVO extends LogVO {
|
||||
private String requestMethod;
|
||||
|
||||
/**
|
||||
* 请求URL
|
||||
* 请求 URL
|
||||
*/
|
||||
@Schema(description = "请求URL")
|
||||
@Schema(description = "请求 URL")
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 请求耗时(ms)
|
||||
*/
|
||||
@Schema(description = "请求耗时(ms)")
|
||||
private Long elapsedTime;
|
||||
|
||||
/**
|
||||
* 客户端IP
|
||||
*/
|
||||
@@ -86,6 +68,12 @@ public class SystemLogVO extends LogVO {
|
||||
@Schema(description = "浏览器")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 请求耗时(ms)
|
||||
*/
|
||||
@Schema(description = "请求耗时(ms)")
|
||||
private Long elapsedTime;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
|
Reference in New Issue
Block a user