|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *根据用户标识获取客户端TGC接口 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public  static  BaseResponse<ApplyCTGTResponse>   applyCTGT(ApplyCTGTRequest param){ | 
|---|
|  |  |  | log.info("【海康根据用户标识获取客户端TGC接口】================开始===="+JSONObject.toJSONString(param)); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | String res = HKTools.applyCTGT(JSONObject.toJSONString(param)); | 
|---|
|  |  |  | TypeReference typeReference = | 
|---|
|  |  |  | new TypeReference< BaseResponse<ApplyCTGTResponse>>(){}; | 
|---|
|  |  |  | BaseResponse<ApplyCTGTResponse>   result = JSONObject.parseObject(res, typeReference.getType()); | 
|---|
|  |  |  | logResult(result,"海康根据用户标识获取客户端TGC接口"); | 
|---|
|  |  |  | return  result; | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  | log.error("【海康根据用户标识获取客户端TGC接口息】================失败====:\n"+ e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *根据登录标识TGC申请登录凭证ST接口 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public  static  BaseResponse<ApplySTResponse>   applyST(ApplySTequest param){ | 
|---|
|  |  |  | log.info("【海康根据登录标识TGC申请登录凭证ST接口】================开始===="+JSONObject.toJSONString(param)); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | String res = HKTools.applyST(JSONObject.toJSONString(param)); | 
|---|
|  |  |  | TypeReference typeReference = | 
|---|
|  |  |  | new TypeReference< BaseResponse<ApplySTResponse>>(){}; | 
|---|
|  |  |  | BaseResponse<ApplySTResponse>   result = JSONObject.parseObject(res, typeReference.getType()); | 
|---|
|  |  |  | logResult(result,"海康根据登录标识TGC申请登录凭证ST接口口"); | 
|---|
|  |  |  | return  result; | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  | log.error("【海康根据登录标识TGC申请登录凭证ST接口息】================失败====:\n"+ e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private static void logResult(BaseResponse res,String name) { | 
|---|
|  |  |  | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ | 
|---|
|  |  |  | log.info("【"+name+"】================成功====\n"+res); | 
|---|