refactor(sis): 1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
767551cb34
commit
6246f897cb
@ -99,13 +99,18 @@ public class HuaWeiBoxApiService implements HuaWeiBoxApi {
|
|||||||
JSONObject jsonRes = JSONUtil.parseObj(jsonStrRes);
|
JSONObject jsonRes = JSONUtil.parseObj(jsonStrRes);
|
||||||
|
|
||||||
if (jsonRes.getInt("resultCode") != 0) {
|
if (jsonRes.getInt("resultCode") != 0) {
|
||||||
log.error("华为盒子人脸比对败,msg:{}", jsonRes.getStr("resultMsg"));
|
log.error("调用华为盒子人脸比对接口失败,code:{},msg:{}", jsonRes.getInt("resultCode"), jsonRes.getStr("resultMsg"));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray jsonArr = jsonRes.getJSONArray("algorithmCode");
|
JSONArray jsonArr = jsonRes.getJSONArray("algorithmResults");
|
||||||
JSONObject obj = jsonArr.getJSONObject(0);
|
JSONObject obj = jsonArr.getJSONObject(0);
|
||||||
|
|
||||||
|
if (Integer.parseInt(obj.getStr("number")) == 0) {
|
||||||
|
log.error("无人脸比对数据");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray peopleList = obj.getJSONArray("peopleList");
|
JSONArray peopleList = obj.getJSONArray("peopleList");
|
||||||
JSONObject people = peopleList.getJSONObject(0);
|
JSONObject people = peopleList.getJSONObject(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user