|
@@ -52,9 +52,7 @@ public class IdCardAnalyzeService {
|
|
|
options.put("detect_direction", "false");
|
|
|
options.put("detect_risk", "false");
|
|
|
String idCardSide = "front";
|
|
|
- byte[] file;
|
|
|
- String content = param.getContent().split("base64,")[1];
|
|
|
- file = Base64.getDecoder().decode(content);
|
|
|
+ byte[] file = Base64.getMimeDecoder().decode(param.getContent().split("base64,")[1]);
|
|
|
JSONObject res = client.idcard(file, idCardSide, options);
|
|
|
log.info("解析身份证图像结果:{}", res);
|
|
|
if (1 == res.getInt("idcard_number_type")) {
|