|
|
|
@@ -98,7 +98,7 @@ public class OrderExpiringSchedule { |
|
|
|
List<WxOrder> orderCoupons = wxOrderMapper.findListOfUnpaidOrderByDate(dateMap); |
|
|
|
orderCoupons.stream().forEach( o -> { |
|
|
|
try { |
|
|
|
proxy.orderExpired(o); |
|
|
|
proxy.orderExpired(o,true); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("券过期失败" + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -112,7 +112,7 @@ public class OrderExpiringSchedule { |
|
|
|
List<WxOrder> orderPresss = wxOrderMapper.findListOfCompleteUnPaidPressOrderByDate(dateMap); |
|
|
|
orderPresss.stream().forEach( o -> { |
|
|
|
try { |
|
|
|
proxy.orderPressExpired(o, true); |
|
|
|
proxy.orderPressExpired(o, true,true); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("砍价券支付过期失败" + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -123,7 +123,7 @@ public class OrderExpiringSchedule { |
|
|
|
orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); |
|
|
|
orderPresss.stream().forEach( o -> { |
|
|
|
try { |
|
|
|
proxy.orderPressExpired(o, false); |
|
|
|
proxy.orderPressExpired(o, false,true); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("砍价券过期失败" +e.getMessage()); |
|
|
|
} |
|
|
|
@@ -135,7 +135,7 @@ public class OrderExpiringSchedule { |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_UNPAID.getCode()); |
|
|
|
wxOrderMapper.selectList(new QueryWrapper(order)).stream().forEach(o -> { |
|
|
|
try { |
|
|
|
proxy.orderGroupExpired((WxOrder) o); |
|
|
|
proxy.orderGroupExpired((WxOrder) o,true); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("拼团取消失败" + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -147,7 +147,9 @@ public class OrderExpiringSchedule { |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_OVERTIME.getCode()); |
|
|
|
wxOrderMapper.selectList(new QueryWrapper(order)).stream().forEach(o -> { |
|
|
|
try { |
|
|
|
proxy.returnMoney((WxOrder) o); |
|
|
|
proxy.orderGroupExpired((WxOrder) o,false); |
|
|
|
//wxOrderService.stockBack(order); |
|
|
|
//proxy.returnMoney((WxOrder) o); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("拼团过期退款失败" + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -178,8 +180,7 @@ public class OrderExpiringSchedule { |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_SCHEDU_REFUND.getCode()); |
|
|
|
wxOrderMapper.selectList(new QueryWrapper(order)).stream().forEach(o -> { |
|
|
|
try { |
|
|
|
wxOrderService.stockBack(order); |
|
|
|
proxy.returnMoney((WxOrder) o); |
|
|
|
proxy.orderGroupExpired((WxOrder) o,false); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("参团失败退款失败" + e.getMessage()); |
|
|
|
} |
|
|
|
@@ -227,9 +228,11 @@ public class OrderExpiringSchedule { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void orderExpired(WxOrder order) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
public void orderExpired(WxOrder order,boolean checkRealPay) { |
|
|
|
if (checkRealPay) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// 库存退回 |
|
|
|
wxOrderService.stockBack(order); |
|
|
|
@@ -248,9 +251,11 @@ public class OrderExpiringSchedule { |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void orderPressExpired(WxOrder order, boolean payExpired) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
public void orderPressExpired(WxOrder order, boolean payExpired,boolean checkRealPay) { |
|
|
|
if (checkRealPay) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Date curDate = new Date(); |
|
|
|
@@ -272,9 +277,11 @@ public class OrderExpiringSchedule { |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void orderGroupExpired(WxOrder order) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
public void orderGroupExpired(WxOrder order,boolean checkRealPay) { |
|
|
|
if (checkRealPay) { |
|
|
|
if (wxPaySuccess(order)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Date curDate = new Date(); |
|
|
|
|