|
@@ -144,12 +144,12 @@ public class IdentityAuthService {
|
|
|
} else {
|
|
} else {
|
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
|
Integer bizCode = Optional.ofNullable(data.getInteger("bizCode")).orElse(3);
|
|
Integer bizCode = Optional.ofNullable(data.getInteger("bizCode")).orElse(3);
|
|
|
- if (bizCode != 1) {
|
|
|
|
|
- throw new BusinessException("不匹配");
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ if (bizCode == 1) {
|
|
|
log.info("{} {} {} 实名认证通过", name, phone, idno);
|
|
log.info("{} {} {} 实名认证通过", name, phone, idno);
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ throw new BusinessException("不匹配");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void removeDuplicated() {
|
|
public void removeDuplicated() {
|
|
@@ -239,7 +239,14 @@ public class IdentityAuthService {
|
|
|
} else {
|
|
} else {
|
|
|
LocalDate birth = DateTimeUtils.toLocalDate(identityAuth.getIdNo().substring(6, 14), "yyyyMMdd");
|
|
LocalDate birth = DateTimeUtils.toLocalDate(identityAuth.getIdNo().substring(6, 14), "yyyyMMdd");
|
|
|
long age = ChronoUnit.YEARS.between(birth, LocalDate.now());
|
|
long age = ChronoUnit.YEARS.between(birth, LocalDate.now());
|
|
|
- if (age < 18) {
|
|
|
|
|
|
|
+ if (user.getPhone().startsWith("170") ||
|
|
|
|
|
+ user.getPhone().startsWith("171") ||
|
|
|
|
|
+ user.getPhone().startsWith("162") ||
|
|
|
|
|
+ user.getPhone().startsWith("165") ||
|
|
|
|
|
+ user.getPhone().startsWith("167")) {
|
|
|
|
|
+ result.put("status", AuthStatus.FAIL);
|
|
|
|
|
+ result.put("reason", "虚拟号");
|
|
|
|
|
+ } else if (age < 18) {
|
|
|
result.put("status", AuthStatus.FAIL);
|
|
result.put("status", AuthStatus.FAIL);
|
|
|
result.put("reason", "未满18岁");
|
|
result.put("reason", "未满18岁");
|
|
|
} else if (age > 60) {
|
|
} else if (age > 60) {
|