|
|
@@ -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);
|