|
|
|
@@ -2,7 +2,6 @@ package com.iformall.schedule; |
|
|
|
|
|
|
|
import com.iformall.domain.po.WxAppinfo; |
|
|
|
import com.iformall.domain.po.WxOrder; |
|
|
|
import com.iformall.domain.po.WxOrderGroup; |
|
|
|
import com.iformall.enums.EnumAppType; |
|
|
|
import com.iformall.enums.EnumOrderStatus; |
|
|
|
import com.iformall.enums.EnumOrderType; |
|
|
|
@@ -82,24 +81,36 @@ public class OrderExpiringSchedule { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//拼团 过期与失败 |
|
|
|
List<WxOrderGroup> orderGroups = wxOrderGroupService.findList(null); |
|
|
|
orderGroups.stream().forEach(g -> { |
|
|
|
|
|
|
|
//拼团过期 |
|
|
|
WxOrder order = new WxOrder(); |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_OVERTIME.getCode()); |
|
|
|
wxOrderMapper.select(order).parallelStream().forEach(o -> { |
|
|
|
try { |
|
|
|
wxOrderGroupService.updateGroupStatus(g); |
|
|
|
returnMoney(o); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
logger.error("拼团过期退款失败" + e.getMessage()); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//拼团券下架 |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); |
|
|
|
wxOrderMapper.select(order).parallelStream().forEach(o -> { |
|
|
|
try { |
|
|
|
returnMoney(o); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("拼团券下架退款失败" + e.getMessage()); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//参团失败 |
|
|
|
WxOrder order = new WxOrder(); |
|
|
|
order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_FAILD.getCode()); |
|
|
|
wxOrderMapper.select(order).parallelStream().forEach(o -> { |
|
|
|
try { |
|
|
|
returnMoney(o); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("拼团订单退款失败" + e.getMessage()); |
|
|
|
logger.error("参团失败退款失败" + e.getMessage()); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|