|
|
|
@ -207,7 +207,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
highChildOrderMapper.updateByPrimaryKey(childOrder); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (couponDetail.getCouponSource().equals(4)) { |
|
|
|
|
/* if (couponDetail.getCouponSource().equals(4)) { |
|
|
|
|
// 下单请求
|
|
|
|
|
JSONObject jsonObject = HuiLianTongConfig.recharge(highOrder.getOrderNo(), |
|
|
|
|
childOrder.getSaleCount(), |
|
|
|
@ -219,7 +219,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
JSONObject response = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); |
|
|
|
|
childOrder.setExt2(response.getJSONObject("data").getString("rechargeOrderId")); |
|
|
|
|
highChildOrderMapper.updateByPrimaryKey(childOrder); |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
if (!childOrder.getGiveawayType()) { |
|
|
|
|
// 查看是否需要赠送卡卷
|
|
|
|
@ -327,7 +327,49 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
} |
|
|
|
|
// 贵州高速
|
|
|
|
|
if (coupon.getCouponSource() == 4) { |
|
|
|
|
// 获取token
|
|
|
|
|
String token = huiLianTongConfig.getToken(); |
|
|
|
|
|
|
|
|
|
Map<String, Object> push = new HashMap<>(); |
|
|
|
|
push.put("token", token); |
|
|
|
|
push.put("couTypeCode", coupon.getCouponKey()); |
|
|
|
|
push.put("distCouCount", highChildOrder.getSaleCount()); |
|
|
|
|
push.put("userPhone", highUser.getPhone()); |
|
|
|
|
push.put("thirdUserId", highUser.getUnionId()); |
|
|
|
|
|
|
|
|
|
// 推送给高速
|
|
|
|
|
JSONObject returnParam = HuiLianTongConfig.couJointDist(token, highOrder.getOrderNo(), coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); |
|
|
|
|
if (returnParam != null && returnParam.getString("result").equals("success")) { |
|
|
|
|
JSONArray dataArray = returnParam.getJSONArray("data"); |
|
|
|
|
for (Object data : dataArray) { |
|
|
|
|
JSONObject dataObject = (JSONObject) data; |
|
|
|
|
HighCouponCodeOther couponCodeOther = new HighCouponCodeOther(); |
|
|
|
|
couponCodeOther.setType(1); |
|
|
|
|
couponCodeOther.setOrderId(highOrder.getId()); |
|
|
|
|
couponCodeOther.setChildOrderId(highChildOrder.getId()); |
|
|
|
|
couponCodeOther.setCouTypeCode(dataObject.getString("couTypeCode")); |
|
|
|
|
couponCodeOther.setCouNo(dataObject.getString("couNo")); |
|
|
|
|
couponCodeOther.setStatus(20); |
|
|
|
|
couponCodeOther.setCreateTime(new Date()); |
|
|
|
|
couponCodeOther.setActiveTime(dataObject.getDate("activeTime")); |
|
|
|
|
couponCodeOther.setValidStartDate(dataObject.getDate("validStartDate")); |
|
|
|
|
couponCodeOther.setValidEndDate(dataObject.getDate("validEndDate")); |
|
|
|
|
highCouponCodeOtherMapper.insert(couponCodeOther); |
|
|
|
|
|
|
|
|
|
// 卡卷关联用户
|
|
|
|
|
HighUserCoupon highUserCoupon = new HighUserCoupon(); |
|
|
|
|
highUserCoupon.setMerchantId(coupon.getMerchantId()); |
|
|
|
|
highUserCoupon.setCouponId(coupon.getId()); |
|
|
|
|
highUserCoupon.setUserId(highOrder.getMemId()); |
|
|
|
|
highUserCoupon.setCreateTime(new Date()); |
|
|
|
|
highUserCoupon.setQrCodeImg(dataObject.getString("couNo")); |
|
|
|
|
highUserCoupon.setUseEndTime(dataObject.getDate("validEndDate")); |
|
|
|
|
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
|
|
|
|
|
highUserCouponMapper.insert(highUserCoupon); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Map<String,Object> push = new HashMap<>(); |
|
|
|
|
push.put("couTypeCode", coupon.getCouponKey()); |
|
|
|
|
push.put("distCouCount", highChildOrder.getSaleCount()); |
|
|
|
|
push.put("userPhone", highUser.getPhone()); |
|
|
|
@ -365,7 +407,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
|
|
|
|
|
highUserCouponMapper.insert(highUserCoupon); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
// 推送记录
|
|
|
|
|
HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); |
|
|
|
|