Add code comment
parent
d195017978
commit
2a97042917
|
@ -11,6 +11,10 @@ import javax.sql.DataSource;
|
||||||
*/
|
*/
|
||||||
public class CustomJdbcClientDetailsService extends JdbcClientDetailsService {
|
public class CustomJdbcClientDetailsService extends JdbcClientDetailsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展的查询SQL,
|
||||||
|
* 增加逻辑删除 条件 archived = 0
|
||||||
|
*/
|
||||||
private static final String SELECT_CLIENT_DETAILS_SQL = "select client_id, client_secret, resource_ids, scope, authorized_grant_types, " +
|
private static final String SELECT_CLIENT_DETAILS_SQL = "select client_id, client_secret, resource_ids, scope, authorized_grant_types, " +
|
||||||
"web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove " +
|
"web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove " +
|
||||||
"from oauth_client_details where client_id = ? and archived = 0 ";
|
"from oauth_client_details where client_id = ? and archived = 0 ";
|
||||||
|
|
|
@ -13,7 +13,14 @@ public class OauthClientDetails implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6947822646185526939L;
|
private static final long serialVersionUID = -6947822646185526939L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间,系统管理
|
||||||
|
*/
|
||||||
private LocalDateTime createTime = DateUtils.now();
|
private LocalDateTime createTime = DateUtils.now();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除标识:true表示已经删除,默认false
|
||||||
|
*/
|
||||||
private boolean archived = false;
|
private boolean archived = false;
|
||||||
|
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
|
@ -8,6 +8,6 @@ public enum Privilege {
|
||||||
USER, //Default privilege
|
USER, //Default privilege
|
||||||
|
|
||||||
ADMIN, //admin
|
ADMIN, //admin
|
||||||
UNITY,
|
UNITY, //资源权限:UNITY
|
||||||
MOBILE
|
MOBILE //资源权限:MOBILE
|
||||||
}
|
}
|
|
@ -16,7 +16,15 @@ public class User extends AbstractDomain {
|
||||||
private static final long serialVersionUID = -2921689304753120556L;
|
private static final long serialVersionUID = -2921689304753120556L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名,唯一
|
||||||
|
*/
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码,加密存储
|
||||||
|
* BCrypt 加密
|
||||||
|
*/
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
private String phone;
|
private String phone;
|
||||||
|
@ -24,8 +32,14 @@ public class User extends AbstractDomain {
|
||||||
//Default user is initial when create database, do not delete
|
//Default user is initial when create database, do not delete
|
||||||
private boolean defaultUser = false;
|
private boolean defaultUser = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后登录时间
|
||||||
|
*/
|
||||||
private Date lastLoginTime;
|
private Date lastLoginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限值
|
||||||
|
*/
|
||||||
private List<Privilege> privileges = new ArrayList<>();
|
private List<Privilege> privileges = new ArrayList<>();
|
||||||
|
|
||||||
public User() {
|
public User() {
|
||||||
|
|
Loading…
Reference in New Issue