mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 12:48:59 +08:00
Merge branch 'master' of https://gitee.com/youlaitech/youlai-mall
This commit is contained in:
commit
96e39c445a
@ -80,6 +80,8 @@ public class SysUserDetails implements UserDetails, CredentialsContainer {
|
||||
Long userId,
|
||||
String username,
|
||||
String password,
|
||||
Integer dataScope,
|
||||
Long deptId,
|
||||
boolean enabled,
|
||||
boolean accountNonExpired,
|
||||
boolean credentialsNonExpired,
|
||||
@ -91,6 +93,8 @@ public class SysUserDetails implements UserDetails, CredentialsContainer {
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.dataScope = dataScope;
|
||||
this.deptId = deptId;
|
||||
this.enabled = enabled;
|
||||
this.accountNonExpired = accountNonExpired;
|
||||
this.credentialsNonExpired = credentialsNonExpired;
|
||||
|
@ -49,11 +49,13 @@ class SysUserDeserializer extends JsonDeserializer<SysUserDetails> {
|
||||
Long userId = readJsonNode(jsonNode, "userId").asLong();
|
||||
String username = readJsonNode(jsonNode, "username").asText();
|
||||
String password = passwordNode.asText("");
|
||||
Integer dataScope = readJsonNode(jsonNode, "dataScope").asInt();
|
||||
Long deptId = readJsonNode(jsonNode, "deptId").asLong();
|
||||
boolean enabled = readJsonNode(jsonNode, "enabled").asBoolean();
|
||||
boolean accountNonExpired = readJsonNode(jsonNode, "accountNonExpired").asBoolean();
|
||||
boolean credentialsNonExpired = readJsonNode(jsonNode, "credentialsNonExpired").asBoolean();
|
||||
boolean accountNonLocked = readJsonNode(jsonNode, "accountNonLocked").asBoolean();
|
||||
SysUserDetails result = new SysUserDetails(userId, username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked,
|
||||
SysUserDetails result = new SysUserDetails(userId, username, password, dataScope, deptId, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked,
|
||||
authorities);
|
||||
if (passwordNode.asText(null) == null) {
|
||||
result.eraseCredentials();
|
||||
|
@ -4,21 +4,4 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.youlai.system.mapper.SysDeptMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.youlai.system.model.entity.SysDept">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="parentId" column="parent_id" jdbcType="BIGINT"/>
|
||||
<result property="treePath" column="tree_path" jdbcType="VARCHAR"/>
|
||||
<result property="sort" column="sort" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="TINYINT"/>
|
||||
<result property="deleted" column="deleted" jdbcType="TINYINT"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,name,parent_id,
|
||||
tree_path,sort,status,
|
||||
deleted,create_time,update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user