From 121de813d95550a4cc86a35690c248132187644b Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 13 Dec 2021 22:15:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=A0=E5=88=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=93=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hai/config/HuiLianTongUnionCardConfig.java | 17 +++++++++++++++-- .../impl/HltUnionCardVipServiceImpl.java | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java index 597cdef7..4fd33a61 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -106,7 +106,7 @@ public class HuiLianTongUnionCardConfig { Map map = new HashMap<>(); map.put("phone" , phone); // 签名码 - String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode(); + String signCode = CommonSysConst.getSysConfig().getHltMembershipLevelSignCode(); map.put("appId", signCode); Map dataMap = new HashMap<>(); @@ -197,7 +197,7 @@ public class HuiLianTongUnionCardConfig { private static JSONObject requestMembership(String method,Map param) throws Exception { // 签名码 - String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode(); + String signCode = CommonSysConst.getSysConfig().getHltMembershipLevelSignCode(); Map map = new LinkedHashMap<>(); map.put("accessCode", CommonSysConst.getSysConfig().getHltMembershipLevelAccessCode()); @@ -229,5 +229,18 @@ public class HuiLianTongUnionCardConfig { return JSONObject.parseObject(decodeData); } + /** + * 解析响应的参数 + * @param param 参数 + * @return + */ + public static JSONObject resolveResponseMembership(String param) { + String data = param.replace("\\n", ""); + String decodeData = DesUtil.decode(CommonSysConst.getSysConfig().getHltMembershipLevelSignCode(), data, Charset.forName("UTF-8")); + return JSONObject.parseObject(decodeData); + } + + + } diff --git a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java index 5999c32e..872eecba 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java @@ -66,7 +66,7 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); JSONObject consumptionRecord = HuiLianTongUnionCardConfig.TCheckEMsgUnionCardVipRights(phone); - JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")); + JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponseMembership(consumptionRecord.getString("data")); HighUser highUser = highUserService.findByPhone(phone);