将成功使用一次的验证码无效化
This commit is contained in:
parent
98aa23e042
commit
3cf82dba47
@ -238,6 +238,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
@ApiOperation("注销账号")
|
@ApiOperation("注销账号")
|
||||||
@PostMapping("/logout")
|
@PostMapping("/logout")
|
||||||
public R<?> logout(String phone, String code) {
|
public R<?> logout(String phone, String code) {
|
||||||
|
|
||||||
return iXhpcAppUserUserService.logout(phone, code);
|
return iXhpcAppUserUserService.logout(phone, code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,6 +126,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
String password = phone.substring(phone.length() - 6);
|
String password = phone.substring(phone.length() - 6);
|
||||||
xhpcAppUser.setPassword(SecurityUtils.encryptPassword(password));
|
xhpcAppUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
xhpcAppUserMapper.insert(xhpcAppUser);
|
xhpcAppUserMapper.insert(xhpcAppUser);
|
||||||
|
redisService.deleteObject("pvToken:"+phone);
|
||||||
return appLogin(phone, type, openid);
|
return appLogin(phone, type, openid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user