💄 Updating the UI and style files. #1054 【重构】 登录流程简化,减少DB 访问
💄 Updating the UI and style files. #1054 【重构】 登录流程简化,减少DB 访问
This commit is contained in:
1 parent
357e2d8ab2
commit
e470d9f6ed
2 files changed
+4
-2
No files matched your search
+2
@@ -52,6 +52,8 @@ public class PigxTokenEnhancer implements TokenEnhancer {
|
||||
final Map<String, Object> additionalInfo = new HashMap<>(8);
|
||||
PigxUser pigxUser = (PigxUser) authentication.getUserAuthentication().getPrincipal();
|
||||
additionalInfo.put(SecurityConstants.DETAILS_USER, pigxUser);
|
||||
additionalInfo.put(SecurityConstants.DETAILS_USER_ID, pigxUser.getId());
|
||||
additionalInfo.put(SecurityConstants.DETAILS_USERNAME, pigxUser.getUsername());
|
||||
additionalInfo.put(SecurityConstants.DETAILS_LICENSE, SecurityConstants.PIGX_LICENSE);
|
||||
additionalInfo.put(SecurityConstants.ACTIVE, Boolean.TRUE);
|
||||
((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(additionalInfo);
|
||||
|
||||
+2
-2
@@ -170,8 +170,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
if (ENCODER.matches(userDto.getPassword(), userVO.getPassword())) {
|
||||
sysUser.setPassword(ENCODER.encode(userDto.getNewpassword1()));
|
||||
} else {
|
||||
log.warn("原密码错误,修改密码失败:{}", userDto.getUsername());
|
||||
return R.ok(Boolean.FALSE, "原密码错误,修改失败");
|
||||
log.info("原密码错误,修改密码失败:{}", userDto.getUsername());
|
||||
return R.failed("原密码错误,修改失败");
|
||||
}
|
||||
}
|
||||
sysUser.setPhone(userDto.getPhone());
|
||||
|
||||
Reference in new issue
Block a user