提交代码

dev-discount
胡锐 3 years ago
parent be6beb508d
commit c1c56a6297
  1. 72
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -186,55 +186,55 @@ public class GoodsOrderServiceImpl implements PayService {
// 贵州中石化 // 贵州中石化
if (coupon.getCouponSource() == 4) { if (coupon.getCouponSource() == 4) {
// 获取token // 获取token
// String token = huiLianTongConfig.getToken(); String token = huiLianTongConfig.getToken();
Map<String,Object> push = new HashMap<>(); Map<String,Object> push = new HashMap<>();
// push.put("token", token); push.put("token", token);
push.put("couTypeCode", coupon.getCouponKey()); push.put("couTypeCode", coupon.getCouponKey());
push.put("distCouCount", highChildOrder.getSaleCount()); push.put("distCouCount", highChildOrder.getSaleCount());
push.put("userPhone", highUser.getPhone()); push.put("userPhone", highUser.getPhone());
push.put("thirdUserId", highUser.getUnionId()); push.put("thirdUserId", highUser.getUnionId());
// // 推送给高速 // 推送给高速
// JSONObject returnParam = HuiLianTongConfig.couJointDist(token, order.getOrderNo(),coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); JSONObject returnParam = HuiLianTongConfig.couJointDist(token, order.getOrderNo(),coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId());
// if (returnParam != null && returnParam.getString("result").equals("success")) { if (returnParam != null && returnParam.getString("result").equals("success")) {
// JSONArray dataArray = returnParam.getJSONArray("data"); JSONArray dataArray = returnParam.getJSONArray("data");
// for (Object data : dataArray) { for (Object data : dataArray) {
// JSONObject dataObject = (JSONObject) data; JSONObject dataObject = (JSONObject) data;
// HighCouponCodeOther couponCodeOther = new HighCouponCodeOther(); HighCouponCodeOther couponCodeOther = new HighCouponCodeOther();
// couponCodeOther.setType(1); couponCodeOther.setType(1);
// couponCodeOther.setOrderId(order.getId()); couponCodeOther.setOrderId(order.getId());
// couponCodeOther.setChildOrderId(highChildOrder.getId()); couponCodeOther.setChildOrderId(highChildOrder.getId());
// couponCodeOther.setCouTypeCode(dataObject.getString("couTypeCode")); couponCodeOther.setCouTypeCode(dataObject.getString("couTypeCode"));
// couponCodeOther.setCouNo(dataObject.getString("couNo")); couponCodeOther.setCouNo(dataObject.getString("couNo"));
// couponCodeOther.setStatus(20); couponCodeOther.setStatus(20);
// couponCodeOther.setCreateTime(new Date()); couponCodeOther.setCreateTime(new Date());
// couponCodeOther.setActiveTime(dataObject.getDate("activeTime")); couponCodeOther.setActiveTime(dataObject.getDate("activeTime"));
// couponCodeOther.setValidStartDate(dataObject.getDate("validStartDate")); couponCodeOther.setValidStartDate(dataObject.getDate("validStartDate"));
// couponCodeOther.setValidEndDate(dataObject.getDate("validEndDate")); couponCodeOther.setValidEndDate(dataObject.getDate("validEndDate"));
// highCouponCodeOtherMapper.insert(couponCodeOther); highCouponCodeOtherMapper.insert(couponCodeOther);
//
// // 卡卷关联用户 // 卡卷关联用户
// HighUserCoupon highUserCoupon = new HighUserCoupon(); HighUserCoupon highUserCoupon = new HighUserCoupon();
// highUserCoupon.setMerchantId(coupon.getMerchantId()); highUserCoupon.setMerchantId(coupon.getMerchantId());
// highUserCoupon.setCouponId(coupon.getId()); highUserCoupon.setCouponId(coupon.getId());
// highUserCoupon.setUserId(order.getMemId()); highUserCoupon.setUserId(order.getMemId());
// highUserCoupon.setCreateTime(new Date()); highUserCoupon.setCreateTime(new Date());
// highUserCoupon.setQrCodeImg(dataObject.getString("couNo")); highUserCoupon.setQrCodeImg(dataObject.getString("couNo"));
// highUserCoupon.setUseEndTime(dataObject.getDate("validEndDate")); highUserCoupon.setUseEndTime(dataObject.getDate("validEndDate"));
// highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
// highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);
// } }
// } }
// 推送记录 // 推送记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type6.getType()); highGasOrderPush.setType(OrderPushType.type6.getType());
highGasOrderPush.setOrderNo(order.getOrderNo()); highGasOrderPush.setOrderNo(order.getOrderNo());
highGasOrderPush.setCreateTime(new Date()); highGasOrderPush.setCreateTime(new Date());
// highGasOrderPush.setCode(returnParam.getString("result")); highGasOrderPush.setCode(returnParam.getString("result"));
// highGasOrderPush.setRequestContent(JSONObject.toJSONString(push)); highGasOrderPush.setRequestContent(JSONObject.toJSONString(push));
// highGasOrderPush.setReturnContent(returnParam.toJSONString()); highGasOrderPush.setReturnContent(returnParam.toJSONString());
highGasOrderPushMapper.insert(highGasOrderPush); highGasOrderPushMapper.insert(highGasOrderPush);
} else { } else {

Loading…
Cancel
Save