|
|
|
@@ -112,6 +112,10 @@ public class CouponOrderExpiringSchedule { |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void couponOrderExpire(WxCouponOrder co, boolean bStockBack) { |
|
|
|
//商品订单不过期 |
|
|
|
if(EnumCouponType.COUPON_DISTRIBUTION.getCode().equals(co.getCouponType())){ |
|
|
|
return; |
|
|
|
} |
|
|
|
// 标记 couponOrder过期 |
|
|
|
WxCouponOrder updateRecord = new WxCouponOrder(); |
|
|
|
updateRecord.setId(co.getId()); |
|
|
|
@@ -127,7 +131,8 @@ public class CouponOrderExpiringSchedule { |
|
|
|
// 库存退回 |
|
|
|
if(bStockBack) { |
|
|
|
WxOrder order = wxOrderMapper.selectById(co.getOrderId(),co.getTenantId()); |
|
|
|
if(order != null) { |
|
|
|
//券包子券没有库存 |
|
|
|
if(order != null && order.getParentOrderId() == 0l) { |
|
|
|
wxOrderService.stockBack(order); |
|
|
|
} |
|
|
|
} |
|
|
|
|