Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
ab84b48a
提交
ab84b48a
authored
3月 03, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 更新 deleted 标记字段实现相关
上级
616c3731
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
22 行增加
和
39 行删除
+22
-39
Permission.java
...in/java/com/yiring/auth/domain/permission/Permission.java
+2
-5
Role.java
...-auth/src/main/java/com/yiring/auth/domain/role/Role.java
+4
-6
User.java
...-auth/src/main/java/com/yiring/auth/domain/user/User.java
+7
-9
Category.java
...c-dict/src/main/java/com/yiring/dict/domain/Category.java
+2
-5
Dict.java
basic-dict/src/main/java/com/yiring/dict/domain/Dict.java
+3
-7
DictItem.java
...c-dict/src/main/java/com/yiring/dict/domain/DictItem.java
+4
-7
没有找到文件。
basic-auth/src/main/java/com/yiring/auth/domain/permission/Permission.java
浏览文件 @
ab84b48a
...
...
@@ -17,7 +17,6 @@ import lombok.experimental.SuperBuilder;
import
org.hibernate.annotations.Comment
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDeleteAll
;
import
org.hibernate.annotations.Where
;
/**
* 权限
...
...
@@ -28,20 +27,18 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
DELETE_SQL
)
@SQLDelete
(
sql
=
DELETE_SQL
+
BasicEntity
.
Where
.
WHERE_ID
)
@SQLDeleteAll
(
sql
=
DELETE_SQL
)
@Where
(
clause
=
BasicEntity
.
Where
.
EXIST
)
@Entity
@Table
(
name
=
TABLE_NAME
,
indexes
=
{
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
),
@Index
(
columnList
=
Permission
.
Fields
.
type
),
@Index
(
columnList
=
Permission
.
Fields
.
pid
),
@Index
(
columnList
=
Permission
.
Fields
.
tree
),
...
...
basic-auth/src/main/java/com/yiring/auth/domain/role/Role.java
浏览文件 @
ab84b48a
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
domain
.
role
;
import
static
com
.
yiring
.
auth
.
domain
.
role
.
Role
.
DELETE_SQL
;
import
static
com
.
yiring
.
auth
.
domain
.
role
.
Role
.
TABLE_NAME
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
...
...
@@ -31,20 +30,19 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
DELETE_SQL
)
@SQLDeleteAll
(
sql
=
DELETE_SQL
)
@SQLDelete
(
sql
=
Permission
.
DELETE_SQL
+
BasicEntity
.
Where
.
WHERE_ID
)
@SQLDeleteAll
(
sql
=
Permission
.
DELETE_SQL
)
@Where
(
clause
=
BasicEntity
.
Where
.
EXIST
)
@Entity
@Table
(
name
=
TABLE_NAME
,
indexes
=
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
),
uniqueConstraints
=
{
@UniqueConstraint
(
columnNames
=
{
Role
.
Fields
.
uid
,
BasicEntity
.
Fields
.
delete
Time
})
}
indexes
=
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
),
uniqueConstraints
=
{
@UniqueConstraint
(
columnNames
=
{
Role
.
Fields
.
uid
,
BasicEntity
.
Fields
.
delete
d
})
}
)
@Comment
(
"系统角色"
)
public
class
Role
extends
BasicEntity
implements
Serializable
{
...
...
basic-auth/src/main/java/com/yiring/auth/domain/user/User.java
浏览文件 @
ab84b48a
...
...
@@ -2,6 +2,7 @@
package
com
.
yiring
.
auth
.
domain
.
user
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yiring.auth.domain.permission.Permission
;
import
com.yiring.auth.domain.role.Role
;
import
com.yiring.common.domain.BasicEntity
;
import
jakarta.persistence.*
;
...
...
@@ -17,7 +18,6 @@ import lombok.experimental.SuperBuilder;
import
org.hibernate.annotations.Comment
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDeleteAll
;
import
org.hibernate.annotations.Where
;
/**
* 用户
...
...
@@ -28,23 +28,21 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
User
.
DELETE_SQL
)
@SQLDeleteAll
(
sql
=
User
.
DELETE_SQL
)
@Where
(
clause
=
User
.
Where
.
EXIST
)
@SQLDelete
(
sql
=
Permission
.
DELETE_SQL
+
BasicEntity
.
Where
.
WHERE_ID
)
@SQLDeleteAll
(
sql
=
Permission
.
DELETE_SQL
)
@Entity
@Table
(
name
=
User
.
TABLE_NAME
,
indexes
=
{
@Index
(
columnList
=
User
.
Fields
.
enabled
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
)
},
indexes
=
{
@Index
(
columnList
=
User
.
Fields
.
enabled
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
)
},
uniqueConstraints
=
{
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
username
,
BasicEntity
.
Fields
.
delete
Time
}),
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
mobile
,
BasicEntity
.
Fields
.
delete
Time
}),
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
email
,
BasicEntity
.
Fields
.
delete
Time
}),
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
username
,
BasicEntity
.
Fields
.
delete
d
}),
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
mobile
,
BasicEntity
.
Fields
.
delete
d
}),
@UniqueConstraint
(
columnNames
=
{
User
.
Fields
.
email
,
BasicEntity
.
Fields
.
delete
d
}),
}
)
@Comment
(
"系统用户"
)
...
...
basic-dict/src/main/java/com/yiring/dict/domain/Category.java
浏览文件 @
ab84b48a
...
...
@@ -18,7 +18,6 @@ import lombok.experimental.SuperBuilder;
import
org.hibernate.annotations.Comment
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDeleteAll
;
import
org.hibernate.annotations.Where
;
/**
* 分类字典
...
...
@@ -30,20 +29,18 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
DELETE_SQL
)
@SQLDelete
(
sql
=
DELETE_SQL
+
BasicEntity
.
Where
.
WHERE_ID
)
@SQLDeleteAll
(
sql
=
DELETE_SQL
)
@Where
(
clause
=
BasicEntity
.
Where
.
EXIST
)
@Entity
@Table
(
name
=
TABLE_NAME
,
indexes
=
{
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
),
@Index
(
columnList
=
Category
.
Fields
.
name
),
@Index
(
columnList
=
Category
.
Fields
.
code
),
}
...
...
basic-dict/src/main/java/com/yiring/dict/domain/Dict.java
浏览文件 @
ab84b48a
/* (C) 2023 YiRing, Inc. */
package
com
.
yiring
.
dict
.
domain
;
import
static
com
.
yiring
.
dict
.
domain
.
Dict
.
DELETE_SQL
;
import
static
com
.
yiring
.
dict
.
domain
.
Dict
.
TABLE_NAME
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
...
...
@@ -18,7 +17,6 @@ import lombok.experimental.SuperBuilder;
import
org.hibernate.annotations.Comment
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDeleteAll
;
import
org.hibernate.annotations.Where
;
/**
* 字典
...
...
@@ -30,20 +28,18 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
DELETE_SQL
)
@SQLDeleteAll
(
sql
=
DELETE_SQL
)
@Where
(
clause
=
BasicEntity
.
Where
.
EXIST
)
@SQLDelete
(
sql
=
Category
.
DELETE_SQL
+
BasicEntity
.
Where
.
WHERE_ID
)
@SQLDeleteAll
(
sql
=
Category
.
DELETE_SQL
)
@Entity
@Table
(
name
=
TABLE_NAME
,
indexes
=
{
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
),
@Index
(
columnList
=
Dict
.
Fields
.
name
),
@Index
(
columnList
=
Dict
.
Fields
.
code
),
}
...
...
basic-dict/src/main/java/com/yiring/dict/domain/DictItem.java
浏览文件 @
ab84b48a
/* (C) 2023 YiRing, Inc. */
package
com
.
yiring
.
dict
.
domain
;
import
static
com
.
yiring
.
dict
.
domain
.
DictItem
.
DELETE_SQL
;
import
static
com
.
yiring
.
common
.
domain
.
BasicEntity
.
Where
.
WHERE_ID
;
import
static
com
.
yiring
.
dict
.
domain
.
DictItem
.
TABLE_NAME
;
import
com.yiring.common.domain.BasicEntity
;
...
...
@@ -15,7 +15,6 @@ import lombok.experimental.SuperBuilder;
import
org.hibernate.annotations.Comment
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDeleteAll
;
import
org.hibernate.annotations.Where
;
/**
* 字典选项
...
...
@@ -27,20 +26,18 @@ import org.hibernate.annotations.Where;
@Getter
@Setter
@EqualsAndHashCode
(
callSuper
=
false
)
@SuperBuilder
(
toBuilder
=
true
)
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
@SQLDelete
(
sql
=
DELETE_SQL
)
@SQLDeleteAll
(
sql
=
DELETE_SQL
)
@Where
(
clause
=
BasicEntity
.
Where
.
EXIST
)
@SQLDelete
(
sql
=
Category
.
DELETE_SQL
+
WHERE_ID
)
@SQLDeleteAll
(
sql
=
Category
.
DELETE_SQL
)
@Entity
@Table
(
name
=
TABLE_NAME
,
indexes
=
{
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
Time
),
@Index
(
columnList
=
BasicEntity
.
Fields
.
delete
d
),
@Index
(
columnList
=
DictItem
.
Fields
.
name
),
@Index
(
columnList
=
DictItem
.
Fields
.
enable
),
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论