class UserServiceImpl implements UserService {

    @Override
    public void deleteById(int id) {
        User user = findById(id);
        if (root.equals(user.getEmail())) {
            throw new RuntimeException("ROOT 用户不能删除");
        }

        userRepository.deleteById(id);
        userAppRepository.deleteByUserId(id);
    }

}