From c3a5a9ae94e5604160f0ba4ac6148934db84f26b Mon Sep 17 00:00:00 2001 From: manailin <261030956@qq.com> Date: 星期日, 27 六月 2021 15:58:50 +0800 Subject: [PATCH] [新增]走访任务向市平台推送。推送市平台测环境 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java index cac3cc6..4575728 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java @@ -40,10 +40,13 @@ 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("公安实名认证接口超时,请重试"); -- Gitblit v1.7.1