调整
This commit is contained in:
parent
2abd834444
commit
cefed27c64
@ -67,16 +67,21 @@ public class CameraPreview {
|
|||||||
/**
|
/**
|
||||||
* STEP6:调用接口
|
* STEP6:调用接口
|
||||||
*/
|
*/
|
||||||
String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null,
|
try {
|
||||||
contentType, header);// post请求application/json类型参数
|
String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null,
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
contentType, header);// post请求application/json类型参数
|
||||||
if (result != null) {
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
String code = jsonResult.getString("code");
|
if (result != null) {
|
||||||
if (!code.equals("0")) {
|
String code = jsonResult.getString("code");
|
||||||
log.error("调用海康开发平台接口出现错误,请求接口:" + requestUrl + "请求参数 :" + body + "返回错误码:" + code);
|
if (!code.equals("0")) {
|
||||||
jsonResult = null;
|
log.error("调用海康开发平台接口出现错误,请求接口:" + requestUrl + "请求参数 :" + body + "返回错误码:" + code);
|
||||||
|
jsonResult = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return jsonResult;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("调用海康接口错误" + e.getMessage());
|
||||||
}
|
}
|
||||||
return jsonResult;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user