|
|
|
@@ -158,6 +158,7 @@ public class OrderExpiringSchedule { |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); |
|
|
|
wxOrderMapper.selectList(new QueryWrapper(order)).stream().forEach(o -> { |
|
|
|
try { |
|
|
|
proxy.orderGroupBreak((WxOrder) o); |
|
|
|
proxy.returnMoney((WxOrder) o); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("拼团券下架退款失败" + e.getMessage()); |
|
|
|
@@ -304,6 +305,17 @@ public class OrderExpiringSchedule { |
|
|
|
wxOrderService.orderClose(updateOrder); |
|
|
|
logger.info("拼团订单: " + order.getId() + " create at " + order.getCreateDate() + " expired at " + curDate); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void orderGroupBreak(WxOrder order) { |
|
|
|
Date curDate = new Date(); |
|
|
|
WxOrder updateOrder = new WxOrder(); |
|
|
|
updateOrder.setId(order.getId()); |
|
|
|
updateOrder.updateTenantInfo(order); |
|
|
|
updateOrder.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_BREAK.getCode()); |
|
|
|
updateOrder.setUpdateDate(curDate); |
|
|
|
wxOrderMapper.updateById(updateOrder); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 回调会再次扣减库存 |
|
|
|
|