【新增】用户注销接口
This commit is contained in:
@@ -35,14 +35,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
private final Ip2RegionUtil ip2RegionUtil;
|
||||
private final UserMapper userMapper;
|
||||
private final RedisUtil redisUtil;
|
||||
private final UserService userService;
|
||||
|
||||
public UserServiceImpl(VerifyCodeService verifyCodeService, Ip2RegionUtil ip2RegionUtil, UserMapper userMapper, RedisUtil redisUtil, UserService userService) {
|
||||
public UserServiceImpl(VerifyCodeService verifyCodeService, Ip2RegionUtil ip2RegionUtil, UserMapper userMapper, RedisUtil redisUtil) {
|
||||
this.verifyCodeService = verifyCodeService;
|
||||
this.ip2RegionUtil = ip2RegionUtil;
|
||||
this.userMapper = userMapper;
|
||||
this.redisUtil = redisUtil;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -326,7 +324,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
StpUtil.logout();
|
||||
|
||||
// 删除记录
|
||||
userService.removeById(user.getId());
|
||||
this.removeById(user.getId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user