diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 8b6f7dad..4ccb5dd2 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -31,6 +31,9 @@ public class CommonSysConfig { private String HuiLianTongUnionCardAccessCode; private String HuiLianTongUnionCardSignCode; + private String HltMembershipLevelAccessCode; + private String HltMembershipLevelSignCode; + private String unionPayUrl; private String unionPayChannelid; private String unionPayMerid; @@ -350,4 +353,20 @@ public class CommonSysConfig { public void setCzOrderNotify(String czOrderNotify) { this.czOrderNotify = czOrderNotify; } + + public String getHltMembershipLevelAccessCode() { + return HltMembershipLevelAccessCode; + } + + public void setHltMembershipLevelAccessCode(String hltMembershipLevelAccessCode) { + HltMembershipLevelAccessCode = hltMembershipLevelAccessCode; + } + + public String getHltMembershipLevelSignCode() { + return HltMembershipLevelSignCode; + } + + public void setHltMembershipLevelSignCode(String hltMembershipLevelSignCode) { + HltMembershipLevelSignCode = hltMembershipLevelSignCode; + } } 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 56cef103..597cdef7 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -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 param) throws Exception { + // 签名码 + String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode(); + + Map 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 参数 diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageRecordMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageRecordMapperExt.java index e70194dc..98073f61 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageRecordMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageRecordMapperExt.java @@ -21,7 +21,6 @@ public interface HighDiscountPackageRecordMapperExt { " status = 1 " + " AND sales_type = 2 " + " AND user_id = #{userId} " + - " AND using_attribution = #{usingAttribution} " + " AND DATE_FORMAT(created_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m'); " ) /** 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 6a12c999..5999c32e 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 @@ -103,7 +103,7 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { Map map = new HashMap<>(); map.put("companyId", bsCompany.getId()); - map.put("usingAttribution", 1); + map.put("usingAttribution", equityLevel); map.put("salesType", 2); map.put("status", 1); diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 6c8ecde9..fffb5593 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -20,8 +20,13 @@ huiliantongAppsecret=FA28E95ACABFA4B2B8E25857437B07F1 # ???????? HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json -HuiLianTongUnionCardAccessCode=19741F626EE446939CE6D448B0FB0EE8 -HuiLianTongUnionCardSignCode=7854B96C +HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE +HuiLianTongUnionCardSignCode=F8E91A3C + +HltMembershipLevelAccessCode = 9766699A55D640BB97FD8674CF13CCB4 +HltMembershipLevelSignCode = C9B28C9A + + # ?????? unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc diff --git a/hai-service/src/main/resources/prod-9401/commonConfig.properties b/hai-service/src/main/resources/prod-9401/commonConfig.properties index 5df4d7c7..feaaa8b7 100644 --- a/hai-service/src/main/resources/prod-9401/commonConfig.properties +++ b/hai-service/src/main/resources/prod-9401/commonConfig.properties @@ -19,6 +19,9 @@ HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE HuiLianTongUnionCardSignCode=F8E91A3C +HltMembershipLevelAccessCode = 9766699A55D640BB97FD8674CF13CCB4 +HltMembershipLevelSignCode = C9B28C9A + unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc unionPayChannelid=D01X00000801226 unionPayMerid=83169055983W000 diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index 5df4d7c7..feaaa8b7 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -19,6 +19,9 @@ HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE HuiLianTongUnionCardSignCode=F8E91A3C +HltMembershipLevelAccessCode = 9766699A55D640BB97FD8674CF13CCB4 +HltMembershipLevelSignCode = C9B28C9A + unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc unionPayChannelid=D01X00000801226 unionPayMerid=83169055983W000