Browse Source

订单超时支付定时任务修改

lyx 3 tháng trước cách đây
mục cha
commit
338abe16d3

+ 1 - 1
alien-job/src/main/java/shop/alien/job/store/LifeUserOrderJob.java

@@ -63,7 +63,7 @@ public class LifeUserOrderJob {
                 .set(LifeUserOrder::getCancelReason,"订单超时未支付")
                 .in(LifeUserOrder::getId,orderIds));
         // 根据类型分组
-        Map<Integer, List<String>> collect = lifeUserOrders.stream()
+        Map<Integer, List<String>> collect = lifeUserOrders.stream().filter(order -> order.getCouponType() != null)
                 .collect(Collectors.groupingBy(
                         LifeUserOrder::getCouponType,  // 按订单类型分组
                         Collectors.mapping(  // 对每个分组中的元素提取ID