Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
7fe31802
"eladmin-logging/src/git@ustchcs.com:gujinli1118/eladmin.git" did not exist on "207e6fb1dfba92f3c56bcf450c94ec7c895160a7"
Commit
7fe31802
authored
Oct 27, 2019
by
dqjdda
Browse files
代码优化,更新sql文件
parent
e2b0b93c
Changes
23
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java
View file @
7fe31802
...
@@ -2,10 +2,11 @@ package me.zhengjie.modules.quartz.domain;
...
@@ -2,10 +2,11 @@ package me.zhengjie.modules.quartz.domain;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -15,7 +16,7 @@ import javax.validation.constraints.NotNull;
...
@@ -15,7 +16,7 @@ import javax.validation.constraints.NotNull;
@Setter
@Setter
@Entity
@Entity
@Table
(
name
=
"quartz_job"
)
@Table
(
name
=
"quartz_job"
)
public
class
QuartzJob
extends
BaseEntity
{
public
class
QuartzJob
{
public
static
final
String
JOB_KEY
=
"JOB_KEY"
;
public
static
final
String
JOB_KEY
=
"JOB_KEY"
;
...
@@ -55,4 +56,10 @@ public class QuartzJob extends BaseEntity {
...
@@ -55,4 +56,10 @@ public class QuartzJob extends BaseEntity {
@Column
(
name
=
"remark"
)
@Column
(
name
=
"remark"
)
@NotBlank
@NotBlank
private
String
remark
;
private
String
remark
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java
View file @
7fe31802
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.Set
;
import
java.util.Set
;
/**
/**
...
@@ -17,7 +18,7 @@ import java.util.Set;
...
@@ -17,7 +18,7 @@ import java.util.Set;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"dept"
)
@Table
(
name
=
"dept"
)
public
class
Dept
extends
BaseEntity
{
public
class
Dept
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -39,4 +40,10 @@ public class Dept extends BaseEntity {
...
@@ -39,4 +40,10 @@ public class Dept extends BaseEntity {
@JsonIgnore
@JsonIgnore
@ManyToMany
(
mappedBy
=
"depts"
)
@ManyToMany
(
mappedBy
=
"depts"
)
private
Set
<
Role
>
roles
;
private
Set
<
Role
>
roles
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java
View file @
7fe31802
...
@@ -3,9 +3,11 @@ package me.zhengjie.modules.system.domain;
...
@@ -3,9 +3,11 @@ package me.zhengjie.modules.system.domain;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -16,7 +18,7 @@ import java.util.List;
...
@@ -16,7 +18,7 @@ import java.util.List;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"dict"
)
@Table
(
name
=
"dict"
)
public
class
Dict
extends
BaseEntity
{
public
class
Dict
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -31,6 +33,12 @@ public class Dict extends BaseEntity {
...
@@ -31,6 +33,12 @@ public class Dict extends BaseEntity {
@Column
(
name
=
"remark"
)
@Column
(
name
=
"remark"
)
private
String
remark
;
private
String
remark
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
@OneToMany
(
mappedBy
=
"dict"
,
cascade
={
CascadeType
.
PERSIST
,
CascadeType
.
REMOVE
})
@OneToMany
(
mappedBy
=
"dict"
,
cascade
={
CascadeType
.
PERSIST
,
CascadeType
.
REMOVE
})
private
List
<
DictDetail
>
dictDetails
;
private
List
<
DictDetail
>
dictDetails
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java
View file @
7fe31802
...
@@ -2,9 +2,10 @@ package me.zhengjie.modules.system.domain;
...
@@ -2,9 +2,10 @@ package me.zhengjie.modules.system.domain;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -14,7 +15,7 @@ import javax.validation.constraints.NotNull;
...
@@ -14,7 +15,7 @@ import javax.validation.constraints.NotNull;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"dict_detail"
)
@Table
(
name
=
"dict_detail"
)
public
class
DictDetail
extends
BaseEntity
{
public
class
DictDetail
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -38,4 +39,10 @@ public class DictDetail extends BaseEntity {
...
@@ -38,4 +39,10 @@ public class DictDetail extends BaseEntity {
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
@JoinColumn
(
name
=
"dict_id"
)
@JoinColumn
(
name
=
"dict_id"
)
private
Dict
dict
;
private
Dict
dict
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java
View file @
7fe31802
...
@@ -2,12 +2,13 @@ package me.zhengjie.modules.system.domain;
...
@@ -2,12 +2,13 @@ package me.zhengjie.modules.system.domain;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -17,7 +18,7 @@ import javax.validation.constraints.NotNull;
...
@@ -17,7 +18,7 @@ import javax.validation.constraints.NotNull;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"job"
)
@Table
(
name
=
"job"
)
public
class
Job
extends
BaseEntity
{
public
class
Job
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -40,4 +41,10 @@ public class Job extends BaseEntity {
...
@@ -40,4 +41,10 @@ public class Job extends BaseEntity {
@OneToOne
@OneToOne
@JoinColumn
(
name
=
"dept_id"
)
@JoinColumn
(
name
=
"dept_id"
)
private
Dept
dept
;
private
Dept
dept
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java
View file @
7fe31802
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -18,7 +19,7 @@ import java.util.Set;
...
@@ -18,7 +19,7 @@ import java.util.Set;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"menu"
)
@Table
(
name
=
"menu"
)
public
class
Menu
extends
BaseEntity
{
public
class
Menu
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -61,6 +62,12 @@ public class Menu extends BaseEntity {
...
@@ -61,6 +62,12 @@ public class Menu extends BaseEntity {
@JsonIgnore
@JsonIgnore
private
Set
<
Role
>
roles
;
private
Set
<
Role
>
roles
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
this
==
o
)
return
true
;
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Permission.java
View file @
7fe31802
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.Set
;
import
java.util.Set
;
/**
/**
...
@@ -17,7 +18,7 @@ import java.util.Set;
...
@@ -17,7 +18,7 @@ import java.util.Set;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"permission"
)
@Table
(
name
=
"permission"
)
public
class
Permission
extends
BaseEntity
{
public
class
Permission
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -35,7 +36,13 @@ public class Permission extends BaseEntity {
...
@@ -35,7 +36,13 @@ public class Permission extends BaseEntity {
@NotBlank
@NotBlank
private
String
alias
;
private
String
alias
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
@JsonIgnore
@JsonIgnore
@ManyToMany
(
mappedBy
=
"permissions"
)
@ManyToMany
(
mappedBy
=
"permissions"
)
private
Set
<
Role
>
roles
;
private
Set
<
Role
>
roles
;
public
@interface
Update
{}
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java
View file @
7fe31802
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
...
@@ -3,10 +3,11 @@ package me.zhengjie.modules.system.domain;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -19,7 +20,7 @@ import java.util.Set;
...
@@ -19,7 +20,7 @@ import java.util.Set;
@Table
(
name
=
"role"
)
@Table
(
name
=
"role"
)
@Getter
@Getter
@Setter
@Setter
public
class
Role
extends
BaseEntity
{
public
class
Role
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -57,6 +58,12 @@ public class Role extends BaseEntity {
...
@@ -57,6 +58,12 @@ public class Role extends BaseEntity {
@JoinTable
(
name
=
"roles_depts"
,
joinColumns
=
{
@JoinColumn
(
name
=
"role_id"
,
referencedColumnName
=
"id"
)},
inverseJoinColumns
=
{
@JoinColumn
(
name
=
"dept_id"
,
referencedColumnName
=
"id"
)})
@JoinTable
(
name
=
"roles_depts"
,
joinColumns
=
{
@JoinColumn
(
name
=
"role_id"
,
referencedColumnName
=
"id"
)},
inverseJoinColumns
=
{
@JoinColumn
(
name
=
"dept_id"
,
referencedColumnName
=
"id"
)})
private
Set
<
Dept
>
depts
;
private
Set
<
Dept
>
depts
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
@interface
Update
{}
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
this
==
o
)
return
true
;
...
@@ -69,6 +76,4 @@ public class Role extends BaseEntity {
...
@@ -69,6 +76,4 @@ public class Role extends BaseEntity {
public
int
hashCode
()
{
public
int
hashCode
()
{
return
Objects
.
hash
(
id
);
return
Objects
.
hash
(
id
);
}
}
public
interface
Update
{}
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java
View file @
7fe31802
...
@@ -2,11 +2,12 @@ package me.zhengjie.modules.system.domain;
...
@@ -2,11 +2,12 @@ package me.zhengjie.modules.system.domain;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Pattern
;
import
java.sql.Timestamp
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -18,7 +19,7 @@ import java.util.Set;
...
@@ -18,7 +19,7 @@ import java.util.Set;
@Getter
@Getter
@Setter
@Setter
@Table
(
name
=
"user"
)
@Table
(
name
=
"user"
)
public
class
User
extends
BaseEntity
{
public
class
User
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -45,6 +46,10 @@ public class User extends BaseEntity {
...
@@ -45,6 +46,10 @@ public class User extends BaseEntity {
private
String
password
;
private
String
password
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
@Column
(
name
=
"last_password_reset_time"
)
@Column
(
name
=
"last_password_reset_time"
)
private
Date
lastPasswordResetTime
;
private
Date
lastPasswordResetTime
;
...
@@ -59,4 +64,6 @@ public class User extends BaseEntity {
...
@@ -59,4 +64,6 @@ public class User extends BaseEntity {
@OneToOne
@OneToOne
@JoinColumn
(
name
=
"dept_id"
)
@JoinColumn
(
name
=
"dept_id"
)
private
Dept
dept
;
private
Dept
dept
;
public
@interface
Update
{}
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/UserAvatar.java
View file @
7fe31802
...
@@ -5,7 +5,10 @@ import lombok.Getter;
...
@@ -5,7 +5,10 @@ import lombok.Getter;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseEntity
;
import
me.zhengjie.base.BaseEntity
;
import
org.hibernate.annotations.CreationTimestamp
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -16,7 +19,7 @@ import javax.persistence.*;
...
@@ -16,7 +19,7 @@ import javax.persistence.*;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"user_avatar"
)
@Table
(
name
=
"user_avatar"
)
public
class
UserAvatar
extends
BaseEntity
{
public
class
UserAvatar
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -28,6 +31,10 @@ public class UserAvatar extends BaseEntity {
...
@@ -28,6 +31,10 @@ public class UserAvatar extends BaseEntity {
private
String
size
;
private
String
size
;
@Column
(
name
=
"create_time"
)
@CreationTimestamp
private
Timestamp
createTime
;
public
UserAvatar
(
UserAvatar
userAvatar
,
String
realName
,
String
path
,
String
size
)
{
public
UserAvatar
(
UserAvatar
userAvatar
,
String
realName
,
String
path
,
String
size
)
{
this
.
id
=
ObjectUtil
.
isNotEmpty
(
userAvatar
)
?
userAvatar
.
getId
()
:
null
;
this
.
id
=
ObjectUtil
.
isNotEmpty
(
userAvatar
)
?
userAvatar
.
getId
()
:
null
;
this
.
realName
=
realName
;
this
.
realName
=
realName
;
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDTO.java
View file @
7fe31802
...
@@ -3,8 +3,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -3,8 +3,8 @@ package me.zhengjie.modules.system.service.dto;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -13,7 +13,7 @@ import java.util.List;
...
@@ -13,7 +13,7 @@ import java.util.List;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
DeptDTO
extends
BaseDTO
{
public
class
DeptDTO
{
// ID
// ID
private
Long
id
;
private
Long
id
;
...
@@ -30,6 +30,8 @@ public class DeptDTO extends BaseDTO {
...
@@ -30,6 +30,8 @@ public class DeptDTO extends BaseDTO {
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
DeptDTO
>
children
;
private
List
<
DeptDTO
>
children
;
private
Timestamp
createTime
;
public
String
getLabel
()
{
public
String
getLabel
()
{
return
name
;
return
name
;
}
}
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDTO.java
View file @
7fe31802
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -10,11 +11,13 @@ import me.zhengjie.base.BaseDTO;
...
@@ -10,11 +11,13 @@ import me.zhengjie.base.BaseDTO;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
DictDTO
extends
BaseDTO
{
public
class
DictDTO
{
private
Long
id
;
private
Long
id
;
private
String
name
;
private
String
name
;
private
String
remark
;
private
String
remark
;
private
Timestamp
createTime
;
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDetailDTO.java
View file @
7fe31802
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -10,7 +11,7 @@ import me.zhengjie.base.BaseDTO;
...
@@ -10,7 +11,7 @@ import me.zhengjie.base.BaseDTO;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
DictDetailDTO
extends
BaseDTO
{
public
class
DictDetailDTO
{
private
Long
id
;
private
Long
id
;
...
@@ -19,4 +20,6 @@ public class DictDetailDTO extends BaseDTO {
...
@@ -19,4 +20,6 @@ public class DictDetailDTO extends BaseDTO {
private
String
value
;
private
String
value
;
private
String
sort
;
private
String
sort
;
private
Timestamp
createTime
;
}
}
\ No newline at end of file
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/JobDTO.java
View file @
7fe31802
...
@@ -3,7 +3,7 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -3,7 +3,7 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -12,7 +12,7 @@ import me.zhengjie.base.BaseDTO;
...
@@ -12,7 +12,7 @@ import me.zhengjie.base.BaseDTO;
@Getter
@Getter
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
public
class
JobDTO
extends
BaseDTO
{
public
class
JobDTO
{
private
Long
id
;
private
Long
id
;
...
@@ -26,6 +26,8 @@ public class JobDTO extends BaseDTO {
...
@@ -26,6 +26,8 @@ public class JobDTO extends BaseDTO {
private
String
deptSuperiorName
;
private
String
deptSuperiorName
;
private
Timestamp
createTime
;
public
JobDTO
(
String
name
,
Boolean
enabled
)
{
public
JobDTO
(
String
name
,
Boolean
enabled
)
{
this
.
name
=
name
;
this
.
name
=
name
;
this
.
enabled
=
enabled
;
this
.
enabled
=
enabled
;
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/MenuDTO.java
View file @
7fe31802
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -11,7 +12,7 @@ import java.util.List;
...
@@ -11,7 +12,7 @@ import java.util.List;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
MenuDTO
extends
BaseDTO
{
public
class
MenuDTO
{
private
Long
id
;
private
Long
id
;
...
@@ -36,4 +37,6 @@ public class MenuDTO extends BaseDTO {
...
@@ -36,4 +37,6 @@ public class MenuDTO extends BaseDTO {
private
String
icon
;
private
String
icon
;
private
List
<
MenuDTO
>
children
;
private
List
<
MenuDTO
>
children
;
private
Timestamp
createTime
;
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/PermissionDTO.java
View file @
7fe31802
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -11,7 +12,7 @@ import java.util.List;
...
@@ -11,7 +12,7 @@ import java.util.List;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
PermissionDTO
extends
BaseDTO
{
public
class
PermissionDTO
{
private
Long
id
;
private
Long
id
;
...
@@ -22,4 +23,6 @@ public class PermissionDTO extends BaseDTO {
...
@@ -22,4 +23,6 @@ public class PermissionDTO extends BaseDTO {
private
String
alias
;
private
String
alias
;
private
List
<
PermissionDTO
>
children
;
private
List
<
PermissionDTO
>
children
;
private
Timestamp
createTime
;
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleDTO.java
View file @
7fe31802
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
...
@@ -2,7 +2,8 @@ package me.zhengjie.modules.system.service.dto;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
import
java.util.Set
;
import
java.util.Set
;
/**
/**
...
@@ -11,7 +12,7 @@ import java.util.Set;
...
@@ -11,7 +12,7 @@ import java.util.Set;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
RoleDTO
extends
BaseDTO
{
public
class
RoleDTO
{
private
Long
id
;
private
Long
id
;
...
@@ -28,4 +29,6 @@ public class RoleDTO extends BaseDTO {
...
@@ -28,4 +29,6 @@ public class RoleDTO extends BaseDTO {
private
Set
<
MenuDTO
>
menus
;
private
Set
<
MenuDTO
>
menus
;
private
Set
<
DeptDTO
>
depts
;
private
Set
<
DeptDTO
>
depts
;
private
Timestamp
createTime
;
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserDTO.java
View file @
7fe31802
...
@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
...
@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
java.sql.Timestamp
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -14,7 +14,7 @@ import java.util.Set;
...
@@ -14,7 +14,7 @@ import java.util.Set;
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
UserDTO
extends
BaseDTO
{
public
class
UserDTO
{
@ApiModelProperty
(
hidden
=
true
)
@ApiModelProperty
(
hidden
=
true
)
private
Long
id
;
private
Long
id
;
...
@@ -43,4 +43,6 @@ public class UserDTO extends BaseDTO {
...
@@ -43,4 +43,6 @@ public class UserDTO extends BaseDTO {
private
DeptSmallDTO
dept
;
private
DeptSmallDTO
dept
;
private
Long
deptId
;
private
Long
deptId
;
private
Timestamp
createTime
;
}
}
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java
View file @
7fe31802
...
@@ -20,6 +20,7 @@ import me.zhengjie.utils.ValidationUtil;
...
@@ -20,6 +20,7 @@ import me.zhengjie.utils.ValidationUtil;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -46,7 +47,8 @@ public class MenuServiceImpl implements MenuService {
...
@@ -46,7 +47,8 @@ public class MenuServiceImpl implements MenuService {
@Override
@Override
@Cacheable
@Cacheable
public
List
<
MenuDTO
>
queryAll
(
MenuQueryCriteria
criteria
){
public
List
<
MenuDTO
>
queryAll
(
MenuQueryCriteria
criteria
){
return
menuMapper
.
toDto
(
menuRepository
.
findAll
((
root
,
criteriaQuery
,
criteriaBuilder
)
->
QueryHelp
.
getPredicate
(
root
,
criteria
,
criteriaBuilder
)));
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"id"
);
return
menuMapper
.
toDto
(
menuRepository
.
findAll
((
root
,
criteriaQuery
,
criteriaBuilder
)
->
QueryHelp
.
getPredicate
(
root
,
criteria
,
criteriaBuilder
),
sort
));
}
}
@Override
@Override
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/PermissionServiceImpl.java
View file @
7fe31802
...
@@ -14,6 +14,7 @@ import me.zhengjie.utils.ValidationUtil;
...
@@ -14,6 +14,7 @@ import me.zhengjie.utils.ValidationUtil;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -43,7 +44,8 @@ public class PermissionServiceImpl implements PermissionService {
...
@@ -43,7 +44,8 @@ public class PermissionServiceImpl implements PermissionService {
@Override
@Override
@Cacheable
@Cacheable
public
List
<
PermissionDTO
>
queryAll
(
PermissionQueryCriteria
criteria
)
{
public
List
<
PermissionDTO
>
queryAll
(
PermissionQueryCriteria
criteria
)
{
return
permissionMapper
.
toDto
(
permissionRepository
.
findAll
((
root
,
criteriaQuery
,
criteriaBuilder
)
->
QueryHelp
.
getPredicate
(
root
,
criteria
,
criteriaBuilder
)));
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"id"
);
return
permissionMapper
.
toDto
(
permissionRepository
.
findAll
((
root
,
criteriaQuery
,
criteriaBuilder
)
->
QueryHelp
.
getPredicate
(
root
,
criteria
,
criteriaBuilder
),
sort
));
}
}
@Override
@Override
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment