| | |
| | | import com.tourguide.modules.operation.mapper.OperationScenicSpotMapper; |
| | | import com.tourguide.modules.operation.mapper.ScenicMeetingPointMapper; |
| | | import com.tourguide.modules.operation.mapper.ScenicPricingMapper; |
| | | import com.tourguide.modules.operation.dto.PlatformSettingsResponse; |
| | | import com.tourguide.modules.operation.service.PlatformSettingsService; |
| | | import com.tourguide.modules.order.domain.OrderStatus; |
| | | import com.tourguide.modules.order.dto.MiniOrderCreateRequest; |
| | |
| | | pricing.setDiscountPrice(new BigDecimal("36.00")); |
| | | pricing.setMaxParticipants(10); |
| | | when(pricingMapper.selectOne(any())).thenReturn(pricing); |
| | | PlatformSettingsResponse settings = new PlatformSettingsResponse(); |
| | | settings.setSettlementDays(7); |
| | | when(platformSettingsService.getSettings()).thenReturn(settings); |
| | | doAnswer(invocation -> { |
| | | TourOrder order = invocation.getArgument(0); |
| | | order.setId(99L); |
| | |
| | | assertThat(order.getPaymentOrderNo()).isNull(); |
| | | assertThat(order.getPaymentAmount()).isNull(); |
| | | assertThat(order.getPaymentTime()).isNull(); |
| | | assertThat(order.getSettlementDays()).isEqualTo(7); |
| | | assertThat(response.getStatus()).isEqualTo(OrderStatus.PENDING_PAYMENT.getCode()); |
| | | } |
| | | |