将成功使用一次的验证码无效化

This commit is contained in:
little-cat-sweet 2021-08-16 15:58:15 +08:00
parent 98aa23e042
commit 3cf82dba47
2 changed files with 2 additions and 0 deletions

View File

@ -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);
} }
} }

View File

@ -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);
} }