|
@@ -98,29 +98,20 @@ public class LawyerLicenseVerifyUtil {
|
|
|
|
|
|
|
|
private VerifyResult parseResult(JSONObject root) {
|
|
private VerifyResult parseResult(JSONObject root) {
|
|
|
Integer code = root.getInteger("code");
|
|
Integer code = root.getInteger("code");
|
|
|
- if (code == null || code != 0) {
|
|
|
|
|
- String msg = root.getString("message");
|
|
|
|
|
- log.warn("律师执业证核验接口业务错误:code={}, message={}", code, msg);
|
|
|
|
|
- if (code != null && code == 422) {
|
|
|
|
|
- return new VerifyResult(false, "提交资料不完整或格式有误,请检查执业证照片、头像与姓名后重试。");
|
|
|
|
|
- }
|
|
|
|
|
- if (StringUtils.hasText(msg)) {
|
|
|
|
|
- return new VerifyResult(false, "执业证核验未通过:" + msg);
|
|
|
|
|
- }
|
|
|
|
|
- return new VerifyResult(false, "执业证核验未通过,请稍后重试。");
|
|
|
|
|
|
|
+ String msg = root.getString("message");
|
|
|
|
|
+ log.warn("律师执业证核验接口业务错误:code={}, message={}", code, msg);
|
|
|
|
|
+ if (code != null && code == 422) {
|
|
|
|
|
+ return new VerifyResult(false, "提交资料不完整或格式有误,请检查执业证照片、头像与姓名后重试。");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
JSONObject data = root.getJSONObject("data");
|
|
JSONObject data = root.getJSONObject("data");
|
|
|
if (data == null) {
|
|
if (data == null) {
|
|
|
log.warn("律师执业证核验返回 data 为空");
|
|
log.warn("律师执业证核验返回 data 为空");
|
|
|
return new VerifyResult(false, "执业证核验结果异常,请稍后重试。");
|
|
return new VerifyResult(false, "执业证核验结果异常,请稍后重试。");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if (isPass(data)) {
|
|
if (isPass(data)) {
|
|
|
log.info("律师执业证核验通过");
|
|
log.info("律师执业证核验通过");
|
|
|
return new VerifyResult(true, null);
|
|
return new VerifyResult(true, null);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
String userMessage = buildUserFacingFailure(data);
|
|
String userMessage = buildUserFacingFailure(data);
|
|
|
log.warn("律师执业证核验未通过:{}", userMessage);
|
|
log.warn("律师执业证核验未通过:{}", userMessage);
|
|
|
return new VerifyResult(false, userMessage);
|
|
return new VerifyResult(false, userMessage);
|