|
|
@@ -237,10 +237,9 @@ public class UserService {
|
|
|
return jwtTokenUtil.generateToken(JwtUserFactory.create(user));
|
|
|
}
|
|
|
|
|
|
- public String setPassword(Long userId, String key, String code, String password) {
|
|
|
- if (!captchaService.verify(key, code)) {
|
|
|
- throw new BusinessException("验证码错误");
|
|
|
- }
|
|
|
+ public String setPassword(Long userId, String code, String password) {
|
|
|
+ User user = userRepo.findById(userId).orElseThrow(new BusinessException("用户不存在"));
|
|
|
+ smsService.verify(user.getPhone(), code);
|
|
|
return setPassword(userId, password);
|
|
|
}
|
|
|
|