Prechádzať zdrojové kódy

实名

(cherry picked from commit a1ca3ccef5007e1573b00261d52e03b60bba9843)
xiongzhu 3 rokov pred
rodič
commit
e03b6e0750

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

@@ -1,6 +1,8 @@
 package com.izouma.nineth.service;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.github.kevinsawicki.http.HttpRequest;
 import com.izouma.nineth.annotations.RedisLock;
 import com.izouma.nineth.domain.IdentityAuth;
@@ -129,6 +131,7 @@ public class IdentityAuthService {
                 .form("realName", name)
                 .body();
         JSONObject jsonObject = JSONObject.parseObject(body);
+        log.info("validate {} {} \n{}", name, idno, JSON.toJSONString(jsonObject, SerializerFeature.PrettyFormat));
         if (jsonObject.getInteger("error_code") != 0) {
             String msg = jsonObject.getString("reason");
             throw new BusinessException(msg);
@@ -150,7 +153,7 @@ public class IdentityAuthService {
         while (hasMore) {
             Page<Long> page = identityAuthRepo.listUserId(PageRequest.of(pageNum, 100));
             List<Long> userIds = page.getContent();
-            userIds.parallelStream().forEach(userId -> {
+            userIds.forEach(userId -> {
                 userRepo.findById(userId).ifPresent(user -> {
                     log.info("removeDuplicated {}/{} ", count.incrementAndGet(), page.getTotalElements());
                     List<IdentityAuth> list = identityAuthRepo.findByUserId(userId);