feat:
1. prod
This commit is contained in:
@@ -41,4 +41,14 @@ public class APPUserController {
|
|||||||
return R.status(userService.changePassword(password));
|
return R.status(userService.changePassword(password));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请码
|
||||||
|
*/
|
||||||
|
@GetMapping("/invite-code")
|
||||||
|
@ApiOperationSupport(order = 3)
|
||||||
|
@Operation(summary = "是否修改过密码")
|
||||||
|
public R<String> inviteCode() {
|
||||||
|
return R.data(userService.inviteCode());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,9 +104,6 @@ public class AppRegisterTokenGranter extends PasswordTokenGranter {
|
|||||||
user.setAccount(request.getPhone());
|
user.setAccount(request.getPhone());
|
||||||
user.setName(StringUtil.random(10));
|
user.setName(StringUtil.random(10));
|
||||||
user.setPassword(DigestUtil.encrypt(ParamCache.getValue(INIT_PASSWD_VALUE)));
|
user.setPassword(DigestUtil.encrypt(ParamCache.getValue(INIT_PASSWD_VALUE)));
|
||||||
user.setRoleId("1123598816738675202");
|
|
||||||
user.setDeptId("2018922617095507970");
|
|
||||||
user.setPostId("1123598817738675208");
|
|
||||||
|
|
||||||
String code = request.getCode();
|
String code = request.getCode();
|
||||||
Assert.isTrue(code.contains(StringPool.COMMA), ExceptionCode.INVALID_USER.getMessage());
|
Assert.isTrue(code.contains(StringPool.COMMA), ExceptionCode.INVALID_USER.getMessage());
|
||||||
@@ -140,7 +137,6 @@ public class AppRegisterTokenGranter extends PasswordTokenGranter {
|
|||||||
throw new UserInvalidException("验证码验证失败");
|
throw new UserInvalidException("验证码验证失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 执行用户注册
|
// 执行用户注册
|
||||||
if (service.registerAppUser(user)) {
|
if (service.registerAppUser(user)) {
|
||||||
request.setUsername(user.getAccount());
|
request.setUsername(user.getAccount());
|
||||||
|
|||||||
@@ -303,4 +303,7 @@ public interface IUserService extends BaseService<User> {
|
|||||||
Boolean hasChangedPassword();
|
Boolean hasChangedPassword();
|
||||||
|
|
||||||
boolean changePassword(String password);
|
boolean changePassword(String password);
|
||||||
|
|
||||||
|
String inviteCode();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -608,4 +608,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|||||||
user.setPassword(DigestUtil.encrypt(SM2Util.decrypt(password, properties.getPublicKey(), properties.getPrivateKey())));
|
user.setPassword(DigestUtil.encrypt(SM2Util.decrypt(password, properties.getPublicKey(), properties.getPrivateKey())));
|
||||||
return updateById(user);
|
return updateById(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String inviteCode() {
|
||||||
|
return Long.toString(Long.parseLong(AuthUtil.getUserAccount()), 36).toUpperCase();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user