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);