| @@ -82,7 +82,7 @@ public class OrderExpiringSchedule { | |||||
| List<WxOrder> orderPresss = wxOrderMapper.findListOfCompleteUnPaidPressOrderByDate(dateMap); | List<WxOrder> orderPresss = wxOrderMapper.findListOfCompleteUnPaidPressOrderByDate(dateMap); | ||||
| orderPresss.stream().forEach( o -> { | orderPresss.stream().forEach( o -> { | ||||
| try { | try { | ||||
| orderPressExpired(o); | |||||
| orderPressExpired(o, true); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("砍价券支付过期失败" + e.getMessage()); | logger.error("砍价券支付过期失败" + e.getMessage()); | ||||
| } | } | ||||
| @@ -93,7 +93,7 @@ public class OrderExpiringSchedule { | |||||
| orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); | orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); | ||||
| orderPresss.stream().forEach( o -> { | orderPresss.stream().forEach( o -> { | ||||
| try { | try { | ||||
| orderPressExpired(o); | |||||
| orderPressExpired(o, false); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("砍价券过期失败" +e.getMessage()); | logger.error("砍价券过期失败" +e.getMessage()); | ||||
| } | } | ||||
| @@ -165,7 +165,7 @@ public class OrderExpiringSchedule { | |||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void orderPressExpired(WxOrder order) { | |||||
| public void orderPressExpired(WxOrder order, boolean payExpired) { | |||||
| Date curDate = new Date(); | Date curDate = new Date(); | ||||
| WxOrder updateOrder = new WxOrder(); | WxOrder updateOrder = new WxOrder(); | ||||
| updateOrder.setId(order.getId()); | updateOrder.setId(order.getId()); | ||||
| @@ -176,7 +176,11 @@ public class OrderExpiringSchedule { | |||||
| // 库存退回 | // 库存退回 | ||||
| wxOrderService.stockBack(order); | wxOrderService.stockBack(order); | ||||
| logger.info("砍价订单: " + order.getId() + " create at " + order.getCreateDate() + " expired at " + curDate); | |||||
| if(payExpired) { | |||||
| logger.info("砍价订单: 支付过期" + order.getId() + " create at " + order.getCreateDate() + ", update at " + order.getUpdateDate() + " expired at " + curDate); | |||||
| } else { | |||||
| logger.info("砍价订单: 过期" + order.getId() + " create at " + order.getCreateDate() + " expired at " + curDate); | |||||
| } | |||||
| } | } | ||||