feat: 更改数据库主键id生成策略

This commit is contained in:
landaiqing
2024-06-20 00:07:12 +08:00
parent 962b82dd01
commit 8ce221d28a
64 changed files with 1406 additions and 431 deletions

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssAli implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssAws implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssBaidu implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssFtp implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssHuawei implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -20,49 +21,49 @@ import java.util.Date;
public class SchisandraOssJd implements Serializable {
/**
*
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("user_id")
private Long userId;
/**
*
*
*/
@Column("base_path")
private String basePath;
/**
*
*
*/
@Column("bucket_name")
private String bucketName;
/**
*
*
*/
@Column("endpoint")
private String endpoint;
/**
*
*
*/
@Column("access_key")
private String accessKey;
/**
*
*
*/
@Column("secret_key")
private String secretKey;
/**
*
*
*/
@Column("region")
private String region;

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssJdbc implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -20,13 +21,13 @@ import java.util.Date;
public class SchisandraOssJdbcData implements Serializable {
/**
*
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("user_id")
private Long userId;
@@ -64,7 +65,7 @@ public class SchisandraOssJdbcData implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,11 +23,11 @@ public class SchisandraOssJdbcStore implements Serializable {
/**
* 主键
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("user_id")
private Long userId;
@@ -94,7 +95,7 @@ public class SchisandraOssJdbcStore implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssJinshan implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
@@ -167,7 +168,7 @@ public class SchisandraOssJinshan implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -20,19 +21,19 @@ import java.util.Date;
public class SchisandraOssLocal implements Serializable {
/**
*
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("user_id")
private Long userId;
/**
*
*
*/
@Column("base_path")
private String basePath;
@@ -70,7 +71,7 @@ public class SchisandraOssLocal implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -5,6 +5,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -23,7 +24,7 @@ public class SchisandraOssMinio implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -20,67 +21,67 @@ import java.util.Date;
public class SchisandraOssPingan implements Serializable {
/**
*
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("system_user_id")
private Long systemUserId;
/**
*
*
*/
@Column("user_agent")
private String userAgent;
/**
*
*
*/
@Column("obs_url")
private String obsUrl;
/**
*
*
*/
@Column("obs_access_key")
private String obsAccessKey;
/**
*
*
*/
@Column("obs_secret")
private String obsSecret;
/**
*
*
*/
@Column("user_id")
private String userId;
/**
*
*
*/
@Column("base_path")
private String basePath;
/**
*
*
*/
@Column("bucket_name")
private String bucketName;
/**
*
*
*/
@Column("represent_path_in_key")
private String representPathInKey;
/**
*
*
*/
@Column("domain_name")
private String domainName;
@@ -130,7 +131,7 @@ public class SchisandraOssPingan implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -20,49 +21,49 @@ import java.util.Date;
public class SchisandraOssQingyun implements Serializable {
/**
*
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
*
*
*/
@Column("user_id")
private Long userId;
/**
*
*
*/
@Column("endpoint")
private String endpoint;
/**
*
*
*/
@Column("access_key")
private String accessKey;
/**
*
*
*/
@Column("access_secret")
private String accessSecret;
/**
*
*
*/
@Column("bucket_name")
private String bucketName;
/**
*
*
*/
@Column("zone")
private String zone;
/**
*
*
*/
@Column("base_path")
private String basePath;
@@ -154,7 +155,7 @@ public class SchisandraOssQingyun implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssQiniu implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssTencent implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
private Long id;
/**
@@ -202,7 +203,7 @@ public class SchisandraOssTencent implements Serializable {
/**
* 是否删除 0 未删除 1已删除
*/
@Column(value = "is_deleted",isLogicDelete = true)
@Column(value = "is_deleted", isLogicDelete = true)
private Integer isDeleted;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssUcloud implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssUp implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import java.io.Serializable;
@@ -22,7 +23,7 @@ public class SchisandraOssWangyi implements Serializable {
/**
*
*/
@Id(value = "id", keyType = KeyType.Auto)
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
private Long id;
/**

View File

@@ -56,7 +56,7 @@ mybatis-flex:
global-config:
print-banner: false
key-config:
key-type: auto
key-type: generator
normal-value-of-logic-delete: 0
deleted-value-of-logic-delete: 1
logic-delete-column: is_deleted