|
|
@@ -520,4 +520,13 @@ public class UserService {
|
|
|
map.put("success", success);
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
+ public void removeAuth(Long userId) {
|
|
|
+ User user = userRepo.findById(userId).orElseThrow(new BusinessException("用户不存在"));
|
|
|
+ if (user.getAuthStatus() == AuthStatus.SUCCESS) {
|
|
|
+ user.setAuthStatus(AuthStatus.NOT_AUTH);
|
|
|
+ userRepo.save(user);
|
|
|
+ identityAuthRepo.deleteAll(identityAuthRepo.findByUserIdAndDelFalse(userId));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|