Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
lulz1 2024-02-27 18:01:15 +08:00
commit 2fefbbeab8
5 changed files with 58 additions and 51 deletions

View File

@ -2,11 +2,13 @@ package com.chint.domain.aggregates.order;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;
@Data
@Table("train_order_detail")
@Accessors(chain = true)
public class TrainOrderDetail {
@Id
private Long id;

View File

@ -6,6 +6,7 @@ import com.chint.domain.repository.UserRepository;
import com.chint.domain.value_object.*;
import com.chint.interfaces.rest.ly.dto.hotelorderdatapushbach.Resident;
import com.chint.interfaces.rest.ly.dto.search.response.hotel.HotelDetailResponse;
import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@ -17,9 +18,9 @@ import java.util.stream.Collectors;
public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
@Autowired
private UserRepository userRepository;
@Override
public CarOrderDetail createCarOrderDetail(Object carOrderDetailData) {
return null;
@ -27,9 +28,15 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
@Override
public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) {
TrainDetailResponse trainDetailResponse = (TrainDetailResponse) trainOrderDetailData;
TrainDetailResponse.TrainDetailData data = trainDetailResponse.getData();
TrainOrderDetail trainOrderDetail = new TrainOrderDetail();
//映射值
trainOrderDetail.setOrderNo(data.getOrderNo())
.setOverStandard(String.valueOf(data.getRuleViolate()))
;
return null;
return trainOrderDetail;
}
@Override
@ -56,11 +63,9 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
private FlightOrderDetail convertFlight(HotelDetailResponse hotelDetailResponse) {
return null;
}
private HotelOrderDetail convertHotel(HotelDetailResponse hotelDetailResponse) {
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
HotelDetailResponse.Data data = hotelDetailResponse.getData();

View File

@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
import java.util.Optional;
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_TRAIN;
import static com.chint.infrastructure.constant.LegConstant.*;
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_L_Y;
@Component
@ -49,7 +49,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
HotelDetailResponse.Data data = hotelDetailResponse.getData();
return Optional.of(
OrderLegData.builder()
.productType(LEG_TYPE_TRAIN)
.productType(LEG_TYPE_HOTEL)
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
@ -63,7 +63,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
CarDetailResponse.Data data = carDetailResponse.getData();
return Optional.of(
OrderLegData.builder()
.productType(LEG_TYPE_TRAIN)
.productType(LEG_TYPE_TAXI)
.outOrderNo(data.getOrderNo())
.price(String.valueOf(data.getTotalAmount()))
.actualOrderNo(data.getOutOrderNo())
@ -78,7 +78,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
FlightOrderDetail.Data data = flightOrderDetail.getData();
return Optional.of(
OrderLegData.builder()
.productType(LEG_TYPE_TRAIN)
.productType(LEG_TYPE_AIRPLANE)
// .orderNo(data.get())
// .price(String.valueOf( data.getTotalAmount()))
// .actualOrderNo(data.getOutOrderNo())

View File

@ -38,7 +38,7 @@ public class BPMController {
@PostMapping("/reschedule/back")
public Result<TravelStandards> rescheduleBack(@RequestBody BPMBack bpmBack) {
//获取订单号和审批结果
System.out.println("bpmBack = " + bpmBack);
return Result.Success(CommonMessageConstant.SUCCESS);
}
}

View File

@ -53,7 +53,7 @@ public class TrainDetailResponse {
private int bookType;
private int trainIndex;
private String relationOrderNo;
private Boolean ruleViolate;
// Constructors, Getters, and Setters
}
@Data