feat:
1. prod
This commit is contained in:
@@ -41,4 +41,14 @@ public class APPUserController {
|
||||
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.setName(StringUtil.random(10));
|
||||
user.setPassword(DigestUtil.encrypt(ParamCache.getValue(INIT_PASSWD_VALUE)));
|
||||
user.setRoleId("1123598816738675202");
|
||||
user.setDeptId("2018922617095507970");
|
||||
user.setPostId("1123598817738675208");
|
||||
|
||||
String code = request.getCode();
|
||||
Assert.isTrue(code.contains(StringPool.COMMA), ExceptionCode.INVALID_USER.getMessage());
|
||||
@@ -140,7 +137,6 @@ public class AppRegisterTokenGranter extends PasswordTokenGranter {
|
||||
throw new UserInvalidException("验证码验证失败");
|
||||
}
|
||||
|
||||
|
||||
// 执行用户注册
|
||||
if (service.registerAppUser(user)) {
|
||||
request.setUsername(user.getAccount());
|
||||
|
||||
@@ -303,4 +303,7 @@ public interface IUserService extends BaseService<User> {
|
||||
Boolean hasChangedPassword();
|
||||
|
||||
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())));
|
||||
return updateById(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String inviteCode() {
|
||||
return Long.toString(Long.parseLong(AuthUtil.getUserAccount()), 36).toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user