| | |
| | | import com.tourguide.modules.operation.entity.OperationScenicSpot; |
| | | import com.tourguide.modules.operation.mapper.OperationScenicSpotMapper; |
| | | import com.tourguide.modules.order.domain.OrderStatus; |
| | | import com.tourguide.modules.order.domain.RefundStatus; |
| | | import com.tourguide.modules.order.entity.TourOrder; |
| | | import com.tourguide.modules.order.mapper.TourOrderMapper; |
| | | import com.tourguide.modules.system.service.GuideNotificationService; |
| | |
| | | void retryPendingOrders() { |
| | | List<TourOrder> orders = orderMapper.selectList(new LambdaQueryWrapper<TourOrder>() |
| | | .eq(TourOrder::getStatus, OrderStatus.PENDING_ACCEPT.getCode()) |
| | | .isNotNull(TourOrder::getPaymentTime).orderByAsc(TourOrder::getPaymentTime).last("LIMIT " + BATCH_SIZE)); |
| | | .isNotNull(TourOrder::getPaymentTime) |
| | | .and(wrapper -> wrapper.isNull(TourOrder::getRefundStatus) |
| | | .or().eq(TourOrder::getRefundStatus, RefundStatus.NONE.getCode())) |
| | | .orderByAsc(TourOrder::getPaymentTime).last("LIMIT " + BATCH_SIZE)); |
| | | for (TourOrder order : orders) matchingService.match(order.getId()); |
| | | } |
| | | |