From cdca957e4835e359a89fe4c7c9833ab0c78ee4e3 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期一, 01 四月 2024 11:18:10 +0800 Subject: [PATCH] 修改西区uu洗车登录接口500 7 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java index b8d4a9f..eb305e4 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java @@ -3489,13 +3489,17 @@ } catch (Exception e) { e.printStackTrace(); } - Map<String, String> headerMap = new HashMap<>(); + Map<String, Object> headerMap = new HashMap<>(); headerMap.put("appid", appId); - String str=""; + String str="https://uu-api.imashuo.com/member/wx/get-access?"+ "appid=" + appId + + "×tamp=" + uuLoginVO.getTimestamp() + + "&sign=" + uuLoginVO.getSign() + + "&mobile=" + uuLoginVO.getMobile(); + if(!StringUtils.isEmpty(uuLoginVO.getProvince())) { - str=str+"province=" + uuLoginVO.getProvince(); + str=str+"&province=" + uuLoginVO.getProvince(); } @@ -3515,16 +3519,16 @@ } // String resultJson = HttpClientUtil.get("https://uu-api.imashuo.com/member/wx/get-acces.s?province=" + uuLoginVO.getProvince() + "&city=" + uuLoginVO.getCity() + "&area=" + uuLoginVO.getArea() + "&appid=" + appId + "×tamp=" + uuLoginVO.getTimestamp() + "&sign=" + uuLoginVO.getSign() + "&mobile=" + uuLoginVO.getMobile() + "&couponId=" + uuLoginVO.getCouponId(), headerMap, null); - String resultJson = HttpClientUtil.get("https://uu-api.imashuo.com/member/wx/get-access?" + str + - "&appid=" + appId + - "×tamp=" + uuLoginVO.getTimestamp() + - "&sign=" + uuLoginVO.getSign() + - "&mobile=" + uuLoginVO.getMobile() , - headerMap, null); - JSONObject result = JSON.parseObject(resultJson); - if (result.get("status").equals(1)) { - return R.ok(result.get("data")+" "+resultJson); + String resultJson = null; + try { + resultJson = HttpClientUtil.httpGet(str ,headerMap,10000 ,null); + } catch (Exception e) { + e.printStackTrace(); } + JSONObject result = JSON.parseObject(resultJson); +// if (result.get("status").equals(1)) { +// return R.ok(result.get("data")+" "+resultJson); +// } return R.fail("信息错误"+" "+resultJson); } -- Gitblit v1.7.1