Add code comment

2.1.0
shengzhaoli.shengz 2021-09-12 23:00:47 +08:00
parent d195017978
commit 2a97042917
4 changed files with 27 additions and 2 deletions

View File

@ -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 ";

View File

@ -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();
/**
* truefalse
*/
private boolean archived = false; private boolean archived = false;
private String clientId; private String clientId;

View File

@ -8,6 +8,6 @@ public enum Privilege {
USER, //Default privilege USER, //Default privilege
ADMIN, //admin ADMIN, //admin
UNITY, UNITY, //资源权限UNITY
MOBILE MOBILE //资源权限MOBILE
} }

View File

@ -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() {