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