feat: 主键自增改雪花 ID(为分库分表预留)
- 52 个 entity 主键 @TableId 由 IdType.AUTO 改为 IdType.ASSIGN_ID(雪花) - 双服务 application.yml 的 mybatis-plus id-type 由 auto 改为 assign_id - schema 脚本主键去掉 GENERATED BY DEFAULT AS IDENTITY
This commit is contained in:
1 parent
5f9483a86c
commit
bbf46b3445
57 files changed
+115
-115
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("sys_admin_user")
|
||||
public class AdminUser {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
@TableName("sys_admin_user_role")
|
||||
public class AdminUserRole {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private Long roleId;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("audit_log")
|
||||
public class AuditLog {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/** ORDER / ENTITLEMENT / USER / CREATOR / PRICE */
|
||||
private String bizType;
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("sys_menu")
|
||||
public class Menu {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long parentId;
|
||||
private String title;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("sys_operation_log")
|
||||
public class OperationLog {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long adminUserId;
|
||||
private String username;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
@TableName("sys_permission")
|
||||
public class Permission {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("sys_role")
|
||||
public class Role {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
@TableName("sys_role_category")
|
||||
public class RoleCategory {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
@TableName("sys_role_menu")
|
||||
public class RoleMenu {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long roleId;
|
||||
private Long menuId;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
@TableName("sys_role_permission")
|
||||
public class RolePermission {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long roleId;
|
||||
private Long permissionId;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
@TableName("sys_config")
|
||||
public class SysConfig {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String configKey;
|
||||
private String configValue;
|
||||
|
||||
Reference in new issue
Block a user