update:
fix bugs
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user