| | |
| | | * @return |
| | | */ |
| | | public static BaseResponse<List<ParkListResponse>> parkList(ParkListRequest param){ |
| | | log.info("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param)); |
| | | log.info("【海康获取车库列表数据】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.parkList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *事件订阅 |
| | | * @return |
| | | */ |
| | | public static BaseResponse cancelEventSub(EventSubRequest param){ |
| | | log.info("【海康取消事件订阅】================开始===="+JSONObject.toJSONString(param)); |
| | | String res = null; |
| | | try { |
| | | res = HKTools.cancelEventSub(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse >(){}; |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康取消事件订阅"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康取消事件订阅】================失败====:\n"+ e.getMessage()); |
| | | }finally { |
| | | // saveInterfaceLog(param,res); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private static void logResult(BaseResponse res,String name) { |
| | | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ |