fix bugs
This commit is contained in:
2025-10-17 16:03:35 +08:00
parent 2a3d68407b
commit 519ae8e3bb

View File

@@ -151,10 +151,10 @@ public class ARImgIdentifyServiceImpl implements ARImgIdentifyService {
} }
Integer grade = JSONObject.parse(jsonObject.getString("result")).getInteger("grade"); Integer grade = JSONObject.parse(jsonObject.getString("result")).getInteger("grade");
if (grade == -1) { if (grade == -1) {
throw new RuntimeException("图像不符合规范或已损坏"); throw new RuntimeException("图像不符合规范");
} }
if (grade > 2) { if (grade > 2) {
throw new RuntimeException("评分太高,图片难以识别"); throw new RuntimeException("图像可识别度太低,请更换识别度更高的图片");
} }
return Boolean.TRUE; return Boolean.TRUE;
} }