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
@ -86,7 +86,7 @@ public class HuaWeiBoxApiService implements HuaWeiBoxApi {
|
||||
* @return Long
|
||||
*/
|
||||
@Override
|
||||
public Long findPerson(String base64Img){
|
||||
public Long findPerson(String base64Img) {
|
||||
String url = "/sdk_service/rest/facerepositories/peoples";
|
||||
|
||||
FinaHWPersonReq req = new FinaHWPersonReq();
|
||||
@ -99,13 +99,18 @@ public class HuaWeiBoxApiService implements HuaWeiBoxApi {
|
||||
JSONObject jsonRes = JSONUtil.parseObj(jsonStrRes);
|
||||
|
||||
if (jsonRes.getInt("resultCode") != 0) {
|
||||
log.error("华为盒子人脸比对败,msg:{}", jsonRes.getStr("resultMsg"));
|
||||
log.error("调用华为盒子人脸比对接口失败,code:{},msg:{}", jsonRes.getInt("resultCode"), jsonRes.getStr("resultMsg"));
|
||||
return null;
|
||||
}
|
||||
|
||||
JSONArray jsonArr = jsonRes.getJSONArray("algorithmCode");
|
||||
JSONArray jsonArr = jsonRes.getJSONArray("algorithmResults");
|
||||
JSONObject obj = jsonArr.getJSONObject(0);
|
||||
|
||||
if (Integer.parseInt(obj.getStr("number")) == 0) {
|
||||
log.error("无人脸比对数据");
|
||||
return null;
|
||||
}
|
||||
|
||||
JSONArray peopleList = obj.getJSONArray("peopleList");
|
||||
JSONObject people = peopleList.getJSONObject(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user