问题修改

This commit is contained in:
hayu 2025-08-05 15:37:02 +08:00
parent 9611f236b9
commit 97be09380e
1 changed files with 3 additions and 0 deletions

View File

@ -251,11 +251,14 @@ public class AppOcrServiceImpl implements AppOcrService {
String url = "http://10.138.55.102:10000/api_gqj/pre";
JSONObject js = null;
try {
System.out.println("ocr-base64数据:" + bean.getImage());
String jsonStr = JSONObject.toJSONString(bean);
String data = HttpHelper.sendHttpPostForToken(url, jsonStr);
System.out.println("ocr返回数据:" + data);
js = JSONObject.parseObject(data);
} catch (Exception e) {
e.printStackTrace();
log.error("获取OCR编码失败:" + e.getMessage());
}
return AjaxResult.success(js);
}