| | |
| | | import com.tourguide.modules.review.mapper.OrderReviewMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | |
| | | public MiniOrderSummaryResponse summary(Long visitorId) { |
| | | return new MiniOrderSummaryResponse( |
| | | count(visitorId, Collections.singletonList(OrderStatus.PENDING_PAYMENT.getCode())), |
| | | count(visitorId, Arrays.asList( |
| | | OrderStatus.PENDING_ACCEPT.getCode(), OrderStatus.PENDING_MEETING.getCode())), |
| | | count(visitorId, Collections.singletonList(OrderStatus.PENDING_MEETING.getCode())), |
| | | count(visitorId, Collections.singletonList(OrderStatus.IN_SERVICE.getCode())), |
| | | count(visitorId, Collections.singletonList(OrderStatus.COMPLETED.getCode()))); |
| | | } |
| | |
| | | return; |
| | | } |
| | | if (TAB_PENDING_GUIDE.equals(tab)) { |
| | | query.in(TourOrder::getStatus, |
| | | OrderStatus.PENDING_ACCEPT.getCode(), OrderStatus.PENDING_MEETING.getCode()); |
| | | query.eq(TourOrder::getStatus, OrderStatus.PENDING_MEETING.getCode()); |
| | | return; |
| | | } |
| | | if (TAB_SERVING.equals(tab)) { |