|
@@ -342,11 +342,11 @@ public class UserFacade extends UserServiceImpl {
|
|
|
JwtDTO data = new JwtDTO();
|
|
|
if (StringUtil.isBlank(username)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入手机号!");
|
|
|
+ "请输入手机号");
|
|
|
}
|
|
|
if (StringUtil.isBlank(password)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入密码!");
|
|
|
+ "请输入密码");
|
|
|
}
|
|
|
User user = this.findByName(username);
|
|
|
if (null == user) {
|
|
@@ -377,7 +377,7 @@ public class UserFacade extends UserServiceImpl {
|
|
|
JwtDTO data = new JwtDTO();
|
|
|
if (StringUtil.isBlank(refreshToken)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "刷新令牌不能为空!");
|
|
|
+ "刷新令牌不能为空");
|
|
|
}
|
|
|
|
|
|
JWT jwt = authServiceClient.refreshToken("Basic dWFhLXNlcnZpY2U6MTIzNDU2", "refresh_token", refreshToken);
|
|
@@ -399,7 +399,7 @@ public class UserFacade extends UserServiceImpl {
|
|
|
public OAuth2AccessToken checkToken(String token) {
|
|
|
if (StringUtil.isBlank(token)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "令牌不能为空!");
|
|
|
+ "令牌不能为空");
|
|
|
}
|
|
|
|
|
|
OAuth2AccessToken jwt = authServiceClient.checkToken("Basic dWFhLXNlcnZpY2U6MTIzNDU2", token);
|
|
@@ -487,11 +487,11 @@ public class UserFacade extends UserServiceImpl {
|
|
|
public RespDTO resetPassword(String username, String password, String diffPassword) {
|
|
|
if (StringUtil.isBlank(username)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入手机号!");
|
|
|
+ "请输入手机号");
|
|
|
}
|
|
|
if (StringUtil.isBlank(password)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入密码!");
|
|
|
+ "请输入密码");
|
|
|
}
|
|
|
User user = this.findByName(username);
|
|
|
if (null == user) {
|
|
@@ -500,7 +500,7 @@ public class UserFacade extends UserServiceImpl {
|
|
|
PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
|
|
|
if (!StringUtil.isBlank(diffPassword) && "Y".equals(diffPassword)) {
|
|
|
if (passwordEncoder.matches(password, user.getPassword())) {
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "修改后密码不能与修改前相同!");
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "修改后密码不能与修改前相同");
|
|
|
}
|
|
|
}
|
|
|
String entryPassword = passwordEncoder.encode(password);
|
|
@@ -521,15 +521,15 @@ public class UserFacade extends UserServiceImpl {
|
|
|
public Boolean modifyPassword(String password, String modifyPassword) {
|
|
|
if (StringUtil.isBlank(password)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入密码!");
|
|
|
+ "请输入密码");
|
|
|
}
|
|
|
if (StringUtil.isBlank(modifyPassword)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "请输入新密码!");
|
|
|
+ "请输入新密码");
|
|
|
}
|
|
|
if(password.equals(modifyPassword)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
|
- "原密码和新密码不能相同!");
|
|
|
+ "原密码和新密码不能相同");
|
|
|
}
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
User user = this.getById(userId);
|