|
|
|
@ -113,8 +113,8 @@ public class HuiLianTongUnionCardConfig { |
|
|
|
|
dataMap.put("phone" , phone); |
|
|
|
|
dataMap.put("appId", signCode); |
|
|
|
|
// Md5加密
|
|
|
|
|
dataMap.put("sign", WxUtils.generateSignature(map, "621=@=HSG!Business#Controller!" , WXPayConstants.SignType.MD5)); |
|
|
|
|
return request("tetcextra/TCheckEMsgVipRights" , dataMap); |
|
|
|
|
dataMap.put("sign", WxUtils.generateSignature(map, "chg;l;l23e2!~%^&22ovndfgf*@11212ouower=@=HSG!Business#Controller!" , WXPayConstants.SignType.MD5)); |
|
|
|
|
return requestMembership("etcextra/checkEMsgUnionCardVipRights" , dataMap); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_TIMED_OUT, ""); |
|
|
|
@ -195,6 +195,29 @@ public class HuiLianTongUnionCardConfig { |
|
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getHuiLianTongUnionCardUrl(), JSON.toJSONString(map)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static JSONObject requestMembership(String method,Map<String,Object> param) throws Exception { |
|
|
|
|
// 签名码
|
|
|
|
|
String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode(); |
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new LinkedHashMap<>(); |
|
|
|
|
map.put("accessCode", CommonSysConst.getSysConfig().getHltMembershipLevelAccessCode()); |
|
|
|
|
map.put("requestId", new Date().getTime()); |
|
|
|
|
map.put("method", method); |
|
|
|
|
|
|
|
|
|
// DES加密
|
|
|
|
|
map.put("data", DesUtil.encode(JSONObject.toJSONString(param), Charset.forName("UTF-8"),signCode).replace("\\n", "")); |
|
|
|
|
|
|
|
|
|
// 数据签名字符串
|
|
|
|
|
String str = (MapUtils.getString(map,"accessCode")+signCode); |
|
|
|
|
str +=(MapUtils.getString(map,"requestId")+signCode) ; |
|
|
|
|
str += (MapUtils.getString(map,"method") + signCode); |
|
|
|
|
str += (MapUtils.getString(map,"data") + signCode); |
|
|
|
|
|
|
|
|
|
// MD5加密
|
|
|
|
|
map.put("sign", MD5Util.MD5Encode(str, "UTF-8").toUpperCase()); |
|
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getHuiLianTongUnionCardUrl(), JSON.toJSONString(map)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 解析响应的参数 |
|
|
|
|
* @param param 参数 |
|
|
|
|