|
@@ -64,6 +64,10 @@ public class IdCardAnalyzeService {
|
|
|
byte[] file = Base64.getMimeDecoder().decode(param.getContent().split("base64,")[1]);
|
|
|
JSONObject res = client.idcard(file, idCardSide, options);
|
|
|
log.info("解析身份证图像结果:{}", res);
|
|
|
+ if (!res.toString().contains("idcard_number_type")) {
|
|
|
+ return CompletableFuture.completedFuture(ResultVoUtil
|
|
|
+ .fail(ExceptionEnum.LOGICAL_ERROR, "解析身份证服务出现异常,预计明日恢复,请手动输入您的信息。"));
|
|
|
+ }
|
|
|
if (1 == res.getInt("idcard_number_type")) {
|
|
|
IdCardAnalyzeResult idCard = new IdCardAnalyzeResult();
|
|
|
JSONObject result = res.getJSONObject("words_result");
|