xiongzhu 3 rokov pred
rodič
commit
62ff492ef6

+ 4 - 1
src/main/java/com/izouma/nineth/service/IdentityAuthService.java

@@ -205,6 +205,7 @@ public class IdentityAuthService {
         try {
         try {
             List<IdentityAuth> list = identityAuthRepo.findByStatusAndAutoValidated(AuthStatus.PENDING, false);
             List<IdentityAuth> list = identityAuthRepo.findByStatusAndAutoValidated(AuthStatus.PENDING, false);
             list.parallelStream().forEach(identityAuth -> {
             list.parallelStream().forEach(identityAuth -> {
+                log.info("实名 {}", identityAuth.getRealName());
                 boolean success = false;
                 boolean success = false;
                 String reason = null;
                 String reason = null;
                 User user = userRepo.findById(identityAuth.getUserId()).orElseThrow(new BusinessException("用户不存在"));
                 User user = userRepo.findById(identityAuth.getUserId()).orElseThrow(new BusinessException("用户不存在"));
@@ -238,12 +239,14 @@ public class IdentityAuthService {
                         validate(identityAuth.getRealName(), user.getPhone(), identityAuth.getIdNo());
                         validate(identityAuth.getRealName(), user.getPhone(), identityAuth.getIdNo());
                         success = true;
                         success = true;
                     } catch (Exception e) {
                     } catch (Exception e) {
+                        log.error("自动实名出错", e);
                         reason = e.getMessage();
                         reason = e.getMessage();
                     }
                     }
                 }
                 }
                 audit(identityAuth.getId(), success ? AuthStatus.SUCCESS : AuthStatus.PENDING, reason);
                 audit(identityAuth.getId(), success ? AuthStatus.SUCCESS : AuthStatus.PENDING, reason);
             });
             });
-        } catch (Exception ignored) {
+        } catch (Exception e) {
+            log.error("批量自动实名出错", e);
         }
         }
     }
     }
 }
 }