| | |
| | | log.info("请求公安实名认证接口,请求头参数:" + headervalue + encodeToString); |
| | | String postByJson = HttpClientUtil.sendPostByJson(URL, param, 2, headerkey, headervalue + encodeToString); |
| | | log.info("请求公安实名认证接口,返回参数:" + postByJson); |
| | | if(postByJson!=null) { |
| | | int code = JSONObject.parseObject(postByJson).getIntValue("code"); |
| | | if (0 == code) { |
| | | result = true; |
| | | if(postByJson!=null && StringUtils.isNotEmpty(postByJson)) { |
| | | JSONObject obj = JSONObject.parseObject(postByJson); |
| | | if(obj!=null) { |
| | | int code = JSONObject.parseObject(postByJson).getIntValue("code"); |
| | | if (0 == code) { |
| | | result = true; |
| | | } |
| | | } |
| | | }else{ |
| | | throw new ServiceException("公安实名认证接口超时,请重试"); |