dev-discount
胡锐 2 years ago
parent da705b10bd
commit 21fc6020ee
  1. 18
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  2. 59
      hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java
  3. 2
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java

@ -47,6 +47,8 @@ public class CommonSysConfig {
private String HuiLianTongUnionCardUrl; private String HuiLianTongUnionCardUrl;
private String HuiLianTongUnionCardAccessCode; private String HuiLianTongUnionCardAccessCode;
private String HuiLianTongUnionCardSignCode; private String HuiLianTongUnionCardSignCode;
private String HuiliantongDistributorId;
private String HuiliantongSinopecUrl;
private String HltMembershipLevelAccessCode; private String HltMembershipLevelAccessCode;
private String HltMembershipLevelSignCode; private String HltMembershipLevelSignCode;
@ -92,6 +94,22 @@ public class CommonSysConfig {
private String unionSecret; private String unionSecret;
private String unionRsaKey; private String unionRsaKey;
public String getHuiliantongDistributorId() {
return HuiliantongDistributorId;
}
public void setHuiliantongDistributorId(String huiliantongDistributorId) {
HuiliantongDistributorId = huiliantongDistributorId;
}
public String getHuiliantongSinopecUrl() {
return HuiliantongSinopecUrl;
}
public void setHuiliantongSinopecUrl(String huiliantongSinopecUrl) {
HuiliantongSinopecUrl = huiliantongSinopecUrl;
}
public String getShellGroupPartnerId() { public String getShellGroupPartnerId() {
return shellGroupPartnerId; return shellGroupPartnerId;
} }

@ -45,6 +45,65 @@ public class HuiLianTongConfig {
@Resource @Resource
private HighGasOrderPushMapper highGasOrderPushMapper; private HighGasOrderPushMapper highGasOrderPushMapper;
/**
* 获取电子券类型列表
* @return
* @throws Exception
*/
public static JSONObject getHltFuelCoupList() throws Exception {
Map<String,Object> map = new HashMap<>();
map.put("serviceType", "01");
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId());
return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl() + "/getHltFuelCoupList", map);
}
/**
* 下单购买加油券
* @param orderNo
* @param distCouCount
* @param couTypeCode
* @param phone
* @return
* @throws Exception
*/
public static JSONObject recharge(String orderNo, Integer distCouCount, String couTypeCode, String phone) throws Exception {
Map<String,Object> map = new HashMap<>();
map.put("orderNo", orderNo);
map.put("distCouCount", distCouCount);
map.put("couTypeCode", couTypeCode);
map.put("phone", phone);
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId());
return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/recharge", map);
}
/**
* 购买加油券充值订单
* @param couNo 订单号
* @return
* @throws Exception
*/
public static JSONObject getPayOrderByCouNo(String couNo) throws Exception {
Map<String,Object> map = new HashMap<>();
map.put("couNo", couNo);
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId());
return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/getPayOrderByCouNo", map);
}
/**
* 购买加油券充值订单
* @param rechargeOrderId 订单号
* @return
* @throws Exception
*/
public static JSONObject costRechargeOrder(String rechargeOrderId) throws Exception {
Map<String,Object> map = new HashMap<>();
map.put("rechargeOrderId", rechargeOrderId);
map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId());
return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/costRechargeOrder", map);
}
/** /**
* 获取token * 获取token
* @return * @return

@ -215,7 +215,7 @@ public class HuiLianTongUnionCardConfig {
* @return * @return
* @throws Exception * @throws Exception
*/ */
private static JSONObject request(String method,Map<String,Object> param) throws Exception { public static JSONObject request(String method,Map<String,Object> param) throws Exception {
// 签名码 // 签名码
String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode(); String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode();

Loading…
Cancel
Save