提交携程结算明细保存代码
This commit is contained in:
parent
28aa7bdac5
commit
90a1b6994e
|
@ -0,0 +1,48 @@
|
||||||
|
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table("c_trip_car_quick_info")
|
||||||
|
public class CTripCarQuickInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 2343214623512376645L;
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
private Long cTripCarRecordId;
|
||||||
|
private int BookingType;
|
||||||
|
private String UseTime;
|
||||||
|
private String DepartureCityId;
|
||||||
|
private String DepartureDistrictCode;
|
||||||
|
private String DepartureCityName;
|
||||||
|
private String DepartureAddressDetail;
|
||||||
|
private String ArrivalCityId;
|
||||||
|
private String ArrivalDistrictCode;
|
||||||
|
private String ArrivalCityName;
|
||||||
|
private String ArrivalAddressDetail;
|
||||||
|
private int VehicleId;
|
||||||
|
private String VehicleName;
|
||||||
|
private String NormalDistance;
|
||||||
|
private String NormalTime;
|
||||||
|
private String ServiceBeginTime;
|
||||||
|
private String ServiceEndTime;
|
||||||
|
private String SceneName;
|
||||||
|
private String StandardName;
|
||||||
|
// private List<OrderCarResponse.DestinationChangeInfoApi> DestinationChangeList;
|
||||||
|
private String VendorName;
|
||||||
|
// 如果StandardGeoInfo是标准地理信息类
|
||||||
|
// private OrderCarResponse.StandardGeoInfo StandardGeoInfo;
|
||||||
|
private String CancelTime;
|
||||||
|
|
||||||
|
public static CTripCarQuickInfo of(OrderCarResponse.CarOrderQuickProductInfo data) {
|
||||||
|
return BeanUtil.copyProperties(data, CTripCarQuickInfo.class);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,16 +1,31 @@
|
||||||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
@Table("c_trip_car_record")
|
import java.io.Serial;
|
||||||
public class CTripCarRecord {
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table("c_trip_car_record")
|
||||||
|
public class CTripCarRecord implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 5553214622358970145L;
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
@MappedCollection(idColumn = "id")
|
private String recordId;
|
||||||
|
@MappedCollection(idColumn = "c_trip_car_record_id")
|
||||||
private CTripCarRecordBase cTripCarRecordBase;
|
private CTripCarRecordBase cTripCarRecordBase;
|
||||||
|
@MappedCollection(idColumn = "c_trip_car_record_id")
|
||||||
|
private CTripCarQuickInfo cTripCarQuickInfo;
|
||||||
|
|
||||||
|
public static CTripCarRecord of(CTripCarRecordBase cTripCarRecordBase, CTripCarQuickInfo cTripCarQuickInfo) {
|
||||||
|
CTripCarRecord cTripCarRecord = new CTripCarRecord();
|
||||||
|
cTripCarRecord.setCTripCarQuickInfo(cTripCarQuickInfo);
|
||||||
|
cTripCarRecord.setCTripCarRecordBase(cTripCarRecordBase);
|
||||||
|
cTripCarRecord.setRecordId(String.valueOf(cTripCarRecordBase.getRecordId()));
|
||||||
|
return cTripCarRecord;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,11 @@ import java.io.Serializable;
|
||||||
@Data
|
@Data
|
||||||
@Table("c_trip_order_car_settlement_base_info")
|
@Table("c_trip_order_car_settlement_base_info")
|
||||||
public class CTripCarRecordBase implements Serializable {
|
public class CTripCarRecordBase implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 4583214623558870145L;
|
private static final long serialVersionUID = 4583214623558870145L;
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
|
private Long cTripCarRecordId;
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class CTripFlightRecord {
|
||||||
CTripFlightRecord cTripFlightRecord = new CTripFlightRecord();
|
CTripFlightRecord cTripFlightRecord = new CTripFlightRecord();
|
||||||
cTripFlightRecord.setCTripFlightRecordBase(cTripFlightRecordBase);
|
cTripFlightRecord.setCTripFlightRecordBase(cTripFlightRecordBase);
|
||||||
cTripFlightRecord.setCTripFlightInfo(cTripFlightInfo);
|
cTripFlightRecord.setCTripFlightInfo(cTripFlightInfo);
|
||||||
|
cTripFlightRecord.setRecordId(String.valueOf(cTripFlightRecordBase.getRecordId()));
|
||||||
return cTripFlightRecord;
|
return cTripFlightRecord;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
|
||||||
|
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table("c_trip_hotel_info")
|
||||||
|
public class CTripHotelInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4027343172340686513L;
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
private Long cTripHotelRecordId;
|
||||||
|
private String HotelName;
|
||||||
|
private String HotelNameEN;
|
||||||
|
private String CityName;
|
||||||
|
private String CityNameEN;
|
||||||
|
private Integer Star;
|
||||||
|
private boolean IsDomestic;
|
||||||
|
private String ISCU;
|
||||||
|
private Integer CityID;
|
||||||
|
private String DistrictCode;
|
||||||
|
private Integer DistrictID;
|
||||||
|
private String DistrictName;
|
||||||
|
private String BrandName;
|
||||||
|
private Integer ParentCityID;
|
||||||
|
private String ParentCityName;
|
||||||
|
private String ParentCityEnName;
|
||||||
|
private Integer HotelGroupId;
|
||||||
|
private String HotelGroupName;
|
||||||
|
|
||||||
|
public static CTripHotelInfo of(OrderHotelResponse.SettlementHotelDetail data) {
|
||||||
|
return BeanUtil.copyProperties(data, CTripHotelInfo.class);
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,5 +13,14 @@ public class CTripHotelRecord {
|
||||||
private String recordId;
|
private String recordId;
|
||||||
@MappedCollection(idColumn = "c_trip_hotel_record_id")
|
@MappedCollection(idColumn = "c_trip_hotel_record_id")
|
||||||
private CTripHotelRecordBase cTripHotelRecordBase;
|
private CTripHotelRecordBase cTripHotelRecordBase;
|
||||||
|
@MappedCollection(idColumn = "c_trip_hotel_record_id")
|
||||||
|
private CTripHotelInfo cTripHotelInfo;
|
||||||
|
|
||||||
|
public static CTripHotelRecord of(CTripHotelRecordBase cTripHotelRecordBase, CTripHotelInfo cTripHotelInfo) {
|
||||||
|
CTripHotelRecord cTripHotelRecord = new CTripHotelRecord();
|
||||||
|
cTripHotelRecord.setRecordId(String.valueOf(cTripHotelRecordBase.getRecordId()));
|
||||||
|
cTripHotelRecord.setCTripHotelRecordBase(cTripHotelRecordBase);
|
||||||
|
cTripHotelRecord.setCTripHotelInfo(cTripHotelInfo);
|
||||||
|
return cTripHotelRecord;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class CTripHotelRecordBase implements Serializable {
|
||||||
private static final long serialVersionUID = 3087333171110684513L;
|
private static final long serialVersionUID = 3087333171110684513L;
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
|
private Long cTripHotelRecordId;
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
private Integer accountId;
|
private Integer accountId;
|
||||||
|
@ -34,8 +35,8 @@ public class CTripHotelRecordBase implements Serializable {
|
||||||
private Double serviceFee;
|
private Double serviceFee;
|
||||||
private Double extraCharge;
|
private Double extraCharge;
|
||||||
private String accCheckBatchNo;
|
private String accCheckBatchNo;
|
||||||
private String createTime;
|
private String createTime;
|
||||||
private String datachangeLasttime;
|
private String datachangeLasttime;
|
||||||
private Integer orderType;
|
private Integer orderType;
|
||||||
private String subAccCheckBatchNo;
|
private String subAccCheckBatchNo;
|
||||||
private Long tripId;
|
private Long tripId;
|
||||||
|
@ -69,59 +70,54 @@ public class CTripHotelRecordBase implements Serializable {
|
||||||
private BigDecimal averageRoomPrice;
|
private BigDecimal averageRoomPrice;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static CTripHotelRecordBase changeInfo(OrderHotelResponse.SettlementDetail SettlementDetail) {
|
public static CTripHotelRecordBase changeInfo(OrderHotelResponse.SettlementDetail SettlementDetail) {
|
||||||
CTripHotelRecordBase ctripHotelOrderDetail = new CTripHotelRecordBase();
|
CTripHotelRecordBase ctripHotelOrderDetail = new CTripHotelRecordBase();
|
||||||
if (SettlementDetail != null){
|
ctripHotelOrderDetail.setRecordId(SettlementDetail.getRecordId());
|
||||||
ctripHotelOrderDetail.setRecordId(SettlementDetail.getRecordId());
|
ctripHotelOrderDetail.setOrderId(SettlementDetail.getOrderID());
|
||||||
ctripHotelOrderDetail.setOrderId(SettlementDetail.getOrderID());
|
ctripHotelOrderDetail.setAccountId(SettlementDetail.getAccountId());
|
||||||
ctripHotelOrderDetail.setAccountId(SettlementDetail.getAccountId());
|
ctripHotelOrderDetail.setUid(SettlementDetail.getUid());
|
||||||
ctripHotelOrderDetail.setUid(SettlementDetail.getUid());
|
ctripHotelOrderDetail.setDetailType(SettlementDetail.getDetailType());
|
||||||
ctripHotelOrderDetail.setDetailType(SettlementDetail.getDetailType());
|
ctripHotelOrderDetail.setPayType(SettlementDetail.getPayType());
|
||||||
ctripHotelOrderDetail.setPayType(SettlementDetail.getPayType());
|
ctripHotelOrderDetail.setHotelType(SettlementDetail.getHotelType());
|
||||||
ctripHotelOrderDetail.setHotelType(SettlementDetail.getHotelType());
|
ctripHotelOrderDetail.setPrice(SettlementDetail.getPrice());
|
||||||
ctripHotelOrderDetail.setPrice(SettlementDetail.getPrice());
|
ctripHotelOrderDetail.setQuantity(SettlementDetail.getQuantity());
|
||||||
ctripHotelOrderDetail.setQuantity(SettlementDetail.getQuantity());
|
ctripHotelOrderDetail.setAmount(SettlementDetail.getAmount());
|
||||||
ctripHotelOrderDetail.setAmount(SettlementDetail.getAmount());
|
ctripHotelOrderDetail.setServiceFee(SettlementDetail.getServicefee());
|
||||||
ctripHotelOrderDetail.setServiceFee(SettlementDetail.getServicefee());
|
ctripHotelOrderDetail.setExtraCharge(SettlementDetail.getExtraCharge());
|
||||||
ctripHotelOrderDetail.setExtraCharge(SettlementDetail.getExtraCharge());
|
ctripHotelOrderDetail.setAccCheckBatchNo(SettlementDetail.getAccCheckBatchNo());
|
||||||
ctripHotelOrderDetail.setAccCheckBatchNo(SettlementDetail.getAccCheckBatchNo());
|
ctripHotelOrderDetail.setCreateTime(SettlementDetail.getCreatetime());
|
||||||
ctripHotelOrderDetail.setCreateTime(SettlementDetail.getCreatetime());
|
ctripHotelOrderDetail.setDatachangeLasttime(SettlementDetail.getDatachange_Lasttime());
|
||||||
ctripHotelOrderDetail.setDatachangeLasttime(SettlementDetail.getDatachange_Lasttime());
|
ctripHotelOrderDetail.setOrderType(SettlementDetail.getOrderType());
|
||||||
ctripHotelOrderDetail.setOrderType(SettlementDetail.getOrderType());
|
ctripHotelOrderDetail.setSubAccCheckBatchNo(SettlementDetail.getSubAccCheckBatchNo());
|
||||||
ctripHotelOrderDetail.setSubAccCheckBatchNo(SettlementDetail.getSubAccCheckBatchNo());
|
ctripHotelOrderDetail.setTripId(SettlementDetail.getTripID());
|
||||||
ctripHotelOrderDetail.setTripId(SettlementDetail.getTripID());
|
ctripHotelOrderDetail.setSettlementCurrency(SettlementDetail.getSettlementCurrency());
|
||||||
ctripHotelOrderDetail.setSettlementCurrency(SettlementDetail.getSettlementCurrency());
|
ctripHotelOrderDetail.setIsChecked(SettlementDetail.isIsChecked());
|
||||||
ctripHotelOrderDetail.setIsChecked(SettlementDetail.isIsChecked());
|
|
||||||
// ctripHotelOrderDetailis.setDailyAvgPriceInfo(SettlementDetail.getDailyAvgPriceInfo());
|
// ctripHotelOrderDetailis.setDailyAvgPriceInfo(SettlementDetail.getDailyAvgPriceInfo());
|
||||||
// ctripHotelOrderDetailis.setInvoiceIds(SettlementDetail.getInvoiceIds());
|
// ctripHotelOrderDetailis.setInvoiceIds(SettlementDetail.getInvoiceIds());
|
||||||
ctripHotelOrderDetail.setBatchStartDate(SettlementDetail.getBatchStartDate());
|
ctripHotelOrderDetail.setBatchStartDate(SettlementDetail.getBatchStartDate());
|
||||||
ctripHotelOrderDetail.setBatchEndDate(SettlementDetail.getBatchEndDate());
|
ctripHotelOrderDetail.setBatchEndDate(SettlementDetail.getBatchEndDate());
|
||||||
ctripHotelOrderDetail.setFrontendServiceFee(SettlementDetail.getFrontendServiceFee());
|
ctripHotelOrderDetail.setFrontendServiceFee(SettlementDetail.getFrontendServiceFee());
|
||||||
ctripHotelOrderDetail.setCoupon(SettlementDetail.getCoupon());
|
ctripHotelOrderDetail.setCoupon(SettlementDetail.getCoupon());
|
||||||
ctripHotelOrderDetail.setRelatedCostsId(SettlementDetail.getRelatedCostsID());
|
ctripHotelOrderDetail.setRelatedCostsId(SettlementDetail.getRelatedCostsID());
|
||||||
ctripHotelOrderDetail.setApportionMode(SettlementDetail.getApportionMode());
|
ctripHotelOrderDetail.setApportionMode(SettlementDetail.getApportionMode());
|
||||||
ctripHotelOrderDetail.setOrderRoomMode(SettlementDetail.getOrderRoomMode());
|
ctripHotelOrderDetail.setOrderRoomMode(SettlementDetail.getOrderRoomMode());
|
||||||
ctripHotelOrderDetail.setClientApprovalNo(SettlementDetail.getClientApprovalNo());
|
ctripHotelOrderDetail.setClientApprovalNo(SettlementDetail.getClientApprovalNo());
|
||||||
ctripHotelOrderDetail.setFellowApprovalNo(SettlementDetail.getFellowApprovalNo());
|
ctripHotelOrderDetail.setFellowApprovalNo(SettlementDetail.getFellowApprovalNo());
|
||||||
ctripHotelOrderDetail.setLoanServiceFee(SettlementDetail.getLoanServiceFee());
|
ctripHotelOrderDetail.setLoanServiceFee(SettlementDetail.getLoanServiceFee());
|
||||||
ctripHotelOrderDetail.setClientName(SettlementDetail.getClientName());
|
ctripHotelOrderDetail.setClientName(SettlementDetail.getClientName());
|
||||||
ctripHotelOrderDetail.setEmployeeId(SettlementDetail.getEmployeeID());
|
ctripHotelOrderDetail.setEmployeeId(SettlementDetail.getEmployeeID());
|
||||||
ctripHotelOrderDetail.setInsuranceAmount(SettlementDetail.getInsuranceAmount());
|
ctripHotelOrderDetail.setInsuranceAmount(SettlementDetail.getInsuranceAmount());
|
||||||
ctripHotelOrderDetail.setPersonAmount(SettlementDetail.getPersonAmount());
|
ctripHotelOrderDetail.setPersonAmount(SettlementDetail.getPersonAmount());
|
||||||
ctripHotelOrderDetail.setChannelFee(SettlementDetail.getChannelFee());
|
ctripHotelOrderDetail.setChannelFee(SettlementDetail.getChannelFee());
|
||||||
ctripHotelOrderDetail.setPersonalChannelFee(SettlementDetail.getPersonalChannelFee());
|
ctripHotelOrderDetail.setPersonalChannelFee(SettlementDetail.getPersonalChannelFee());
|
||||||
ctripHotelOrderDetail.setPaidAmount(SettlementDetail.getPaidAmount());
|
ctripHotelOrderDetail.setPaidAmount(SettlementDetail.getPaidAmount());
|
||||||
ctripHotelOrderDetail.setPersonalTotalAmount(SettlementDetail.getPersonalTotalAmount());
|
ctripHotelOrderDetail.setPersonalTotalAmount(SettlementDetail.getPersonalTotalAmount());
|
||||||
ctripHotelOrderDetail.setPersonalRemittedTax(SettlementDetail.getPersonalRemittedTax());
|
ctripHotelOrderDetail.setPersonalRemittedTax(SettlementDetail.getPersonalRemittedTax());
|
||||||
ctripHotelOrderDetail.setBookServiceFee(SettlementDetail.getBookServiceFee());
|
ctripHotelOrderDetail.setBookServiceFee(SettlementDetail.getBookServiceFee());
|
||||||
ctripHotelOrderDetail.setModifyServiceFee(SettlementDetail.getModifyServiceFee());
|
ctripHotelOrderDetail.setModifyServiceFee(SettlementDetail.getModifyServiceFee());
|
||||||
ctripHotelOrderDetail.setCancelServiceFee(SettlementDetail.getCancelServiceFee());
|
ctripHotelOrderDetail.setCancelServiceFee(SettlementDetail.getCancelServiceFee());
|
||||||
ctripHotelOrderDetail.setPayDiscountAmount(SettlementDetail.getPayDiscountAmount());
|
ctripHotelOrderDetail.setPayDiscountAmount(SettlementDetail.getPayDiscountAmount());
|
||||||
ctripHotelOrderDetail.setAverageRoomPrice(SettlementDetail.getAverageRoomPrice());
|
ctripHotelOrderDetail.setAverageRoomPrice(SettlementDetail.getAverageRoomPrice());
|
||||||
return ctripHotelOrderDetail;
|
return ctripHotelOrderDetail;
|
||||||
}
|
|
||||||
return null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||||
|
import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table("c_trip_train_info")
|
||||||
|
public class CTripTrainInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 3282323171110442253L;
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
private Long cTripTrainRecordId;
|
||||||
|
private long TicketInfoID;
|
||||||
|
private String TrainName;
|
||||||
|
private String FirstSeatTypeName;
|
||||||
|
private String TrainType;
|
||||||
|
private String DepartureCityName;
|
||||||
|
private String DepartureDate;
|
||||||
|
private String DepartureStationName;
|
||||||
|
private String DepartureStationEn;
|
||||||
|
private String ArrivalCityName;
|
||||||
|
private String ArrivalDate;
|
||||||
|
private String ArrivalStationName;
|
||||||
|
private String ArrivalStationEn;
|
||||||
|
private String ElectronicOrderNo;
|
||||||
|
private int CustomType;
|
||||||
|
private String CustomDetail;
|
||||||
|
private String TrainTicketType;
|
||||||
|
// private List<OrderTrainResponse.TrainData> TrainSeatPriceData;
|
||||||
|
private String ChangeStatus;
|
||||||
|
private double DealTicketPrice;
|
||||||
|
private double RebRefEstimateAmount;
|
||||||
|
private int DepartureCityID;
|
||||||
|
private String DepartureDistrictCode;
|
||||||
|
private int ArrivalCityID;
|
||||||
|
private String ArrivalDistrictCode;
|
||||||
|
private String ChangeCode;
|
||||||
|
private String DealSeatNo;
|
||||||
|
private String DealSeatName;
|
||||||
|
private long DepartureProvinceId;
|
||||||
|
private String DepartureProvinceName;
|
||||||
|
private long DepartureLocationId;
|
||||||
|
private String DepartureLocationName;
|
||||||
|
private int DepartureLocationCategoryId;
|
||||||
|
private long ArrivalProvinceId;
|
||||||
|
private String ArrivalProvinceName;
|
||||||
|
private long ArrivalLocationId;
|
||||||
|
private String ArrivalLocationName;
|
||||||
|
private int ArrivalLocationCategoryId;
|
||||||
|
private int Sequence;
|
||||||
|
private String RefundreasonCode;
|
||||||
|
private String RefundreasonCodeDesc;
|
||||||
|
private String IssueTicketTime;
|
||||||
|
private String RebookTicketSuccessTime;
|
||||||
|
private String RefundTicketSuccessTime;
|
||||||
|
private String ChangePreApprovalId;
|
||||||
|
private String RefundApprovalId;
|
||||||
|
// private OrderTrainResponse.StandardGeoInfo StandardGeoInfo;
|
||||||
|
private String ChangeDescription;
|
||||||
|
|
||||||
|
|
||||||
|
public static CTripTrainInfo of(OrderTrainResponse.CorpTrainSettlementTicketDetail data) {
|
||||||
|
return BeanUtil.copyProperties(data, CTripTrainInfo.class);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||||
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table("c_trip_train_record")
|
||||||
|
public class CTripTrainRecord implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4087333423450684513L;
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
private String recordId;
|
||||||
|
@MappedCollection(idColumn = "c_trip_train_record_id")
|
||||||
|
private CTripTrainRecordBase cTripTrainRecordBase;
|
||||||
|
@MappedCollection(idColumn = "c_trip_train_record_id")
|
||||||
|
private CTripTrainInfo cTripTrainInfo;
|
||||||
|
|
||||||
|
public static CTripTrainRecord of(CTripTrainRecordBase cTripTrainRecordBase, CTripTrainInfo cTripTrainInfo) {
|
||||||
|
CTripTrainRecord cTripTrainRecord = new CTripTrainRecord();
|
||||||
|
cTripTrainRecord.setRecordId(String.valueOf(cTripTrainRecordBase.getRecordId()));
|
||||||
|
cTripTrainRecord.setCTripTrainRecordBase(cTripTrainRecordBase);
|
||||||
|
cTripTrainRecord.setCTripTrainInfo(cTripTrainInfo);
|
||||||
|
return cTripTrainRecord;
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@ public class CTripTrainRecordBase implements Serializable {
|
||||||
private static final long serialVersionUID = 1642492804808714974L;
|
private static final long serialVersionUID = 1642492804808714974L;
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
|
private Long cTripTrainRecordId;
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
private String corpId;
|
private String corpId;
|
||||||
|
@ -78,65 +79,64 @@ public class CTripTrainRecordBase implements Serializable {
|
||||||
public static CTripTrainRecordBase changeInfo(OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail) {
|
public static CTripTrainRecordBase changeInfo(OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail) {
|
||||||
|
|
||||||
CTripTrainRecordBase ctripTrainOrderDetail = new CTripTrainRecordBase();
|
CTripTrainRecordBase ctripTrainOrderDetail = new CTripTrainRecordBase();
|
||||||
if (trainSettlementDetail != null){
|
|
||||||
ctripTrainOrderDetail.setRecordId(trainSettlementDetail.getRecordID());
|
|
||||||
ctripTrainOrderDetail.setOrderId(trainSettlementDetail.getOrderID());
|
|
||||||
ctripTrainOrderDetail.setCorpId(trainSettlementDetail.getCorpId());
|
|
||||||
ctripTrainOrderDetail.setAccountId(trainSettlementDetail.getAccountID());
|
|
||||||
ctripTrainOrderDetail.setUid(trainSettlementDetail.getUID());
|
|
||||||
ctripTrainOrderDetail.setDetailType(trainSettlementDetail.getDetailType());
|
|
||||||
ctripTrainOrderDetail.setPassengerName(trainSettlementDetail.getPassengerName());
|
|
||||||
ctripTrainOrderDetail.setPrice(trainSettlementDetail.getPrice());
|
|
||||||
ctripTrainOrderDetail.setServerFee(trainSettlementDetail.getServerFee());
|
|
||||||
ctripTrainOrderDetail.setCancelFee(trainSettlementDetail.getCancelFee());
|
|
||||||
ctripTrainOrderDetail.setInsureFee(trainSettlementDetail.getInsureFee());
|
|
||||||
ctripTrainOrderDetail.setPaperTicketFee(trainSettlementDetail.getPaperTicketFee());
|
|
||||||
ctripTrainOrderDetail.setDeliverFee(trainSettlementDetail.getDeliverFee());
|
|
||||||
ctripTrainOrderDetail.setReBookingServiceFee(trainSettlementDetail.getReBookingServiceFee());
|
|
||||||
ctripTrainOrderDetail.setRealAmount(trainSettlementDetail.getRealAmount());
|
|
||||||
ctripTrainOrderDetail.setBatchNo(trainSettlementDetail.getBatchNo());
|
|
||||||
ctripTrainOrderDetail.setSettlementType(trainSettlementDetail.getSettlementType());
|
|
||||||
ctripTrainOrderDetail.setCreateTime(trainSettlementDetail.getCreatetime());
|
|
||||||
ctripTrainOrderDetail.setChangeLastTime(trainSettlementDetail.getChangeLasttime());
|
|
||||||
ctripTrainOrderDetail.setOrderType(trainSettlementDetail.getOrderType());
|
|
||||||
ctripTrainOrderDetail.setSubAccCheckBatchNo(trainSettlementDetail.getSubAccCheckBatchNo());
|
|
||||||
ctripTrainOrderDetail.setTripId(trainSettlementDetail.getTripID());
|
|
||||||
ctripTrainOrderDetail.setSettlementCurrency(trainSettlementDetail.getSettlementCurrency());
|
|
||||||
ctripTrainOrderDetail.setGrabServiceFee(trainSettlementDetail.getGrabServiceFee());
|
|
||||||
ctripTrainOrderDetail.setPostServiceFee(trainSettlementDetail.getPostServiceFee());
|
|
||||||
ctripTrainOrderDetail.setRealAmountHasPost(trainSettlementDetail.getRealAmountHasPost());
|
|
||||||
ctripTrainOrderDetail.setIsChecked(trainSettlementDetail.isIsChecked());
|
|
||||||
ctripTrainOrderDetail.setSubDetailType(trainSettlementDetail.getSubDetailType());
|
|
||||||
// ctripTrainOrderDetailis.setInvoiceIds(trainSettlementDetail.getInvoiceIds());
|
|
||||||
ctripTrainOrderDetail.setBatchStartDate(trainSettlementDetail.getBatchStartDate());
|
|
||||||
ctripTrainOrderDetail.setBatchEndDate(trainSettlementDetail.getBatchEndDate());
|
|
||||||
ctripTrainOrderDetail.setAfterTakeTicketFee(trainSettlementDetail.getAfterTakeTicketFee());
|
|
||||||
ctripTrainOrderDetail.setEstimatePrice(trainSettlementDetail.getEstimatePrice());
|
|
||||||
ctripTrainOrderDetail.setEstimaAmount(trainSettlementDetail.getEstimaAmount());
|
|
||||||
ctripTrainOrderDetail.setPurchaseFee(trainSettlementDetail.getPurchaseFee());
|
|
||||||
ctripTrainOrderDetail.setPayMixFlag(trainSettlementDetail.isPayMixFlag());
|
|
||||||
ctripTrainOrderDetail.setPersonalPayTicketFee(trainSettlementDetail.getPersonalPayTicketFee());
|
|
||||||
ctripTrainOrderDetail.setPersonalPayServiceFee(trainSettlementDetail.getPersonalPayServiceFee());
|
|
||||||
ctripTrainOrderDetail.setPersonalPayOtherFee(trainSettlementDetail.getPersonalPayOtherFee());
|
|
||||||
ctripTrainOrderDetail.setTrainChangePrice(trainSettlementDetail.getTrainChangePrice());
|
|
||||||
ctripTrainOrderDetail.setTrainOtherFee(trainSettlementDetail.getTrainOtherFee());
|
|
||||||
ctripTrainOrderDetail.setDealTime(trainSettlementDetail.getDealTime());
|
|
||||||
ctripTrainOrderDetail.setProductType(trainSettlementDetail.getProductType());
|
|
||||||
ctripTrainOrderDetail.setDepartureCountry(trainSettlementDetail.getDepartureCountry());
|
|
||||||
ctripTrainOrderDetail.setArrivalCountry(trainSettlementDetail.getArrivalCountry());
|
|
||||||
ctripTrainOrderDetail.setSequence(trainSettlementDetail.getSequence());
|
|
||||||
ctripTrainOrderDetail.setLoanServiceFee(trainSettlementDetail.getLoanServiceFee());
|
|
||||||
ctripTrainOrderDetail.setIntlIssueTicketFee(trainSettlementDetail.getIntlIssueTicketFee());
|
|
||||||
ctripTrainOrderDetail.setDeductibleTax(trainSettlementDetail.getDeductibleTax());
|
|
||||||
ctripTrainOrderDetail.setNotIncludeTaxPrice(trainSettlementDetail.getNotIncludeTaxPrice());
|
|
||||||
ctripTrainOrderDetail.setOnsiteRefundFlag(trainSettlementDetail.isOnsiteRefundFlag());
|
|
||||||
ctripTrainOrderDetail.setTicketPrice(trainSettlementDetail.getTicketPrice());
|
|
||||||
ctripTrainOrderDetail.setRefundTicketServiceFee(trainSettlementDetail.getRefundTicketServiceFee());
|
|
||||||
|
|
||||||
return ctripTrainOrderDetail;
|
ctripTrainOrderDetail.setRecordId(trainSettlementDetail.getRecordID());
|
||||||
|
ctripTrainOrderDetail.setOrderId(trainSettlementDetail.getOrderID());
|
||||||
|
ctripTrainOrderDetail.setCorpId(trainSettlementDetail.getCorpId());
|
||||||
|
ctripTrainOrderDetail.setAccountId(trainSettlementDetail.getAccountID());
|
||||||
|
ctripTrainOrderDetail.setUid(trainSettlementDetail.getUID());
|
||||||
|
ctripTrainOrderDetail.setDetailType(trainSettlementDetail.getDetailType());
|
||||||
|
ctripTrainOrderDetail.setPassengerName(trainSettlementDetail.getPassengerName());
|
||||||
|
ctripTrainOrderDetail.setPrice(trainSettlementDetail.getPrice());
|
||||||
|
ctripTrainOrderDetail.setServerFee(trainSettlementDetail.getServerFee());
|
||||||
|
ctripTrainOrderDetail.setCancelFee(trainSettlementDetail.getCancelFee());
|
||||||
|
ctripTrainOrderDetail.setInsureFee(trainSettlementDetail.getInsureFee());
|
||||||
|
ctripTrainOrderDetail.setPaperTicketFee(trainSettlementDetail.getPaperTicketFee());
|
||||||
|
ctripTrainOrderDetail.setDeliverFee(trainSettlementDetail.getDeliverFee());
|
||||||
|
ctripTrainOrderDetail.setReBookingServiceFee(trainSettlementDetail.getReBookingServiceFee());
|
||||||
|
ctripTrainOrderDetail.setRealAmount(trainSettlementDetail.getRealAmount());
|
||||||
|
ctripTrainOrderDetail.setBatchNo(trainSettlementDetail.getBatchNo());
|
||||||
|
ctripTrainOrderDetail.setSettlementType(trainSettlementDetail.getSettlementType());
|
||||||
|
ctripTrainOrderDetail.setCreateTime(trainSettlementDetail.getCreatetime());
|
||||||
|
ctripTrainOrderDetail.setChangeLastTime(trainSettlementDetail.getChangeLasttime());
|
||||||
|
ctripTrainOrderDetail.setOrderType(trainSettlementDetail.getOrderType());
|
||||||
|
ctripTrainOrderDetail.setSubAccCheckBatchNo(trainSettlementDetail.getSubAccCheckBatchNo());
|
||||||
|
ctripTrainOrderDetail.setTripId(trainSettlementDetail.getTripID());
|
||||||
|
ctripTrainOrderDetail.setSettlementCurrency(trainSettlementDetail.getSettlementCurrency());
|
||||||
|
ctripTrainOrderDetail.setGrabServiceFee(trainSettlementDetail.getGrabServiceFee());
|
||||||
|
ctripTrainOrderDetail.setPostServiceFee(trainSettlementDetail.getPostServiceFee());
|
||||||
|
ctripTrainOrderDetail.setRealAmountHasPost(trainSettlementDetail.getRealAmountHasPost());
|
||||||
|
ctripTrainOrderDetail.setIsChecked(trainSettlementDetail.isIsChecked());
|
||||||
|
ctripTrainOrderDetail.setSubDetailType(trainSettlementDetail.getSubDetailType());
|
||||||
|
// ctripTrainOrderDetailis.setInvoiceIds(trainSettlementDetail.getInvoiceIds());
|
||||||
|
ctripTrainOrderDetail.setBatchStartDate(trainSettlementDetail.getBatchStartDate());
|
||||||
|
ctripTrainOrderDetail.setBatchEndDate(trainSettlementDetail.getBatchEndDate());
|
||||||
|
ctripTrainOrderDetail.setAfterTakeTicketFee(trainSettlementDetail.getAfterTakeTicketFee());
|
||||||
|
ctripTrainOrderDetail.setEstimatePrice(trainSettlementDetail.getEstimatePrice());
|
||||||
|
ctripTrainOrderDetail.setEstimaAmount(trainSettlementDetail.getEstimaAmount());
|
||||||
|
ctripTrainOrderDetail.setPurchaseFee(trainSettlementDetail.getPurchaseFee());
|
||||||
|
ctripTrainOrderDetail.setPayMixFlag(trainSettlementDetail.isPayMixFlag());
|
||||||
|
ctripTrainOrderDetail.setPersonalPayTicketFee(trainSettlementDetail.getPersonalPayTicketFee());
|
||||||
|
ctripTrainOrderDetail.setPersonalPayServiceFee(trainSettlementDetail.getPersonalPayServiceFee());
|
||||||
|
ctripTrainOrderDetail.setPersonalPayOtherFee(trainSettlementDetail.getPersonalPayOtherFee());
|
||||||
|
ctripTrainOrderDetail.setTrainChangePrice(trainSettlementDetail.getTrainChangePrice());
|
||||||
|
ctripTrainOrderDetail.setTrainOtherFee(trainSettlementDetail.getTrainOtherFee());
|
||||||
|
ctripTrainOrderDetail.setDealTime(trainSettlementDetail.getDealTime());
|
||||||
|
ctripTrainOrderDetail.setProductType(trainSettlementDetail.getProductType());
|
||||||
|
ctripTrainOrderDetail.setDepartureCountry(trainSettlementDetail.getDepartureCountry());
|
||||||
|
ctripTrainOrderDetail.setArrivalCountry(trainSettlementDetail.getArrivalCountry());
|
||||||
|
ctripTrainOrderDetail.setSequence(trainSettlementDetail.getSequence());
|
||||||
|
ctripTrainOrderDetail.setLoanServiceFee(trainSettlementDetail.getLoanServiceFee());
|
||||||
|
ctripTrainOrderDetail.setIntlIssueTicketFee(trainSettlementDetail.getIntlIssueTicketFee());
|
||||||
|
ctripTrainOrderDetail.setDeductibleTax(trainSettlementDetail.getDeductibleTax());
|
||||||
|
ctripTrainOrderDetail.setNotIncludeTaxPrice(trainSettlementDetail.getNotIncludeTaxPrice());
|
||||||
|
ctripTrainOrderDetail.setOnsiteRefundFlag(trainSettlementDetail.isOnsiteRefundFlag());
|
||||||
|
ctripTrainOrderDetail.setTicketPrice(trainSettlementDetail.getTicketPrice());
|
||||||
|
ctripTrainOrderDetail.setRefundTicketServiceFee(trainSettlementDetail.getRefundTicketServiceFee());
|
||||||
|
|
||||||
|
return ctripTrainOrderDetail;
|
||||||
// return BeanUtil.copyProperties(flightOrderSettlementBaseInfo,CtripFlightOrderDetail.class);
|
// return BeanUtil.copyProperties(flightOrderSettlementBaseInfo,CtripFlightOrderDetail.class);
|
||||||
}
|
|
||||||
return null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ public interface CTripOrderDetailRepository {
|
||||||
|
|
||||||
CTripFlightRecord save(CTripFlightRecord cTripFlightRecord);
|
CTripFlightRecord save(CTripFlightRecord cTripFlightRecord);
|
||||||
|
|
||||||
void saveAll(List<CTripFlightRecord> cTripFlightRecordList);
|
|
||||||
|
|
||||||
CTripFlightRecordBase findFlightByRecordId(Long id);
|
CTripFlightRecordBase findFlightByRecordId(Long id);
|
||||||
|
|
||||||
|
@ -38,4 +37,8 @@ public interface CTripOrderDetailRepository {
|
||||||
void saveAllCarRecord(List<CTripCarRecordBase> ctripCarOrderDetailList);
|
void saveAllCarRecord(List<CTripCarRecordBase> ctripCarOrderDetailList);
|
||||||
|
|
||||||
CTripCarRecordBase findCarByRecordId(Long id);
|
CTripCarRecordBase findCarByRecordId(Long id);
|
||||||
|
void saveAllCTripFlightRecord(List<CTripFlightRecord> cTripFlightRecordList);
|
||||||
|
void saveAllCTripHotelRecord(List<CTripHotelRecord> cTripHotelRecordList);
|
||||||
|
void saveAllCTripTrainRecord(List<CTripTrainRecord> cTripTrainRecordList);
|
||||||
|
void saveAllCTripCarRecord(List<CTripCarRecord> cTripCarRecordList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,16 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
||||||
@Autowired
|
@Autowired
|
||||||
private JdbcCTripFlightRecordRepository jdbcCTripFlightRecordRepository;
|
private JdbcCTripFlightRecordRepository jdbcCTripFlightRecordRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JdbcCTripCarRecordRepository jdbcCTripCarRecordRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JdbcCTripHotelRecordRepository jdbcCTripHotelRecordRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JdbcCTripTrainRecordRepository jdbcCTripTrainRecordRepository;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CTripFlightRecordBase save(CTripFlightRecordBase ctripFlightOrderDetail) {
|
public CTripFlightRecordBase save(CTripFlightRecordBase ctripFlightOrderDetail) {
|
||||||
return jdbcCtripFlightOrderDetailRepository.save(ctripFlightOrderDetail);
|
return jdbcCtripFlightOrderDetailRepository.save(ctripFlightOrderDetail);
|
||||||
|
@ -50,10 +60,6 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
||||||
return jdbcCTripFlightRecordRepository.save(cTripFlightRecord);
|
return jdbcCTripFlightRecordRepository.save(cTripFlightRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void saveAll(List<CTripFlightRecord> cTripFlightRecordList) {
|
|
||||||
jdbcCTripFlightRecordRepository.saveAll(cTripFlightRecordList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CTripFlightRecordBase findFlightByRecordId(Long recordId) {
|
public CTripFlightRecordBase findFlightByRecordId(Long recordId) {
|
||||||
|
@ -107,6 +113,26 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
||||||
public CTripCarRecordBase findCarByRecordId(Long recordId) {
|
public CTripCarRecordBase findCarByRecordId(Long recordId) {
|
||||||
return jdbcCtripCarOrderDetailRepository.findByRecordId(recordId);
|
return jdbcCtripCarOrderDetailRepository.findByRecordId(recordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAllCTripFlightRecord(List<CTripFlightRecord> cTripFlightRecordList) {
|
||||||
|
jdbcCTripFlightRecordRepository.saveAll(cTripFlightRecordList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAllCTripHotelRecord(List<CTripHotelRecord> cTripHotelRecordList) {
|
||||||
|
jdbcCTripHotelRecordRepository.saveAll(cTripHotelRecordList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAllCTripTrainRecord(List<CTripTrainRecord> cTripTrainRecordList) {
|
||||||
|
jdbcCTripTrainRecordRepository.saveAll(cTripTrainRecordList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAllCTripCarRecord(List<CTripCarRecord> cTripCarRecordList) {
|
||||||
|
jdbcCTripCarRecordRepository.saveAll(cTripCarRecordList);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public Client findByClientId(String clientId){
|
// public Client findByClientId(String clientId){
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chint.infrastructure.repository.jdbc;
|
||||||
|
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecord;
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecordBase;
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecordBase;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface JdbcCTripCarRecordRepository extends CrudRepository<CTripCarRecord,Long> {
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.chint.infrastructure.repository.jdbc;
|
||||||
|
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecord;
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecordBase;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface JdbcCTripHotelRecordRepository extends CrudRepository<CTripHotelRecord,Long> {
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.chint.infrastructure.repository.jdbc;
|
||||||
|
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecord;
|
||||||
|
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripTrainRecord;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface JdbcCTripTrainRecordRepository extends CrudRepository<CTripTrainRecord,Long> {
|
||||||
|
}
|
|
@ -44,7 +44,7 @@ public class CTripOrderRecordAutoSave {
|
||||||
), CTripFlightInfo.of(it.getOrderFlightInfo())
|
), CTripFlightInfo.of(it.getOrderFlightInfo())
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
cTripOrderDetailRepository.saveAll(cTripFlightRecords);
|
cTripOrderDetailRepository.saveAllCTripFlightRecord(cTripFlightRecords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,12 +53,14 @@ public class CTripOrderRecordAutoSave {
|
||||||
OrderHotelResponse hotelOrder = cTripOrderDetailRequest.getHotelOrder();
|
OrderHotelResponse hotelOrder = cTripOrderDetailRequest.getHotelOrder();
|
||||||
List<OrderHotelResponse.HotelAccountSettlementInfo> lstHtlSettlement = hotelOrder.getLstHtlSettlement();
|
List<OrderHotelResponse.HotelAccountSettlementInfo> lstHtlSettlement = hotelOrder.getLstHtlSettlement();
|
||||||
if (lstHtlSettlement != null && !lstHtlSettlement.isEmpty()) {
|
if (lstHtlSettlement != null && !lstHtlSettlement.isEmpty()) {
|
||||||
List<CTripHotelRecordBase> list = lstHtlSettlement.stream()
|
List<CTripHotelRecord> list = lstHtlSettlement.stream()
|
||||||
.flatMap(it -> it.getLstHotelSettlementDetail().stream())
|
.flatMap(it -> it.getLstHotelSettlementDetail().stream())
|
||||||
.map(OrderHotelResponse.LstHotelSettlementDetail::getSettlementDetail)
|
.map(it ->
|
||||||
.map(CTripHotelRecordBase::changeInfo)
|
CTripHotelRecord.of(CTripHotelRecordBase.changeInfo(it.getSettlementDetail()),
|
||||||
|
CTripHotelInfo.of(it.getHotelDetail()))
|
||||||
|
)
|
||||||
.toList();
|
.toList();
|
||||||
cTripOrderDetailRepository.saveAllHotelRecord(list);
|
cTripOrderDetailRepository.saveAllCTripHotelRecord(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,27 +69,28 @@ public class CTripOrderRecordAutoSave {
|
||||||
OrderTrainResponse trainOrder = cTripOrderDetailRequest.getTrainOrder();
|
OrderTrainResponse trainOrder = cTripOrderDetailRequest.getTrainOrder();
|
||||||
List<OrderTrainResponse.CorpTrainAccountSettlement> lstTrainSettlement = trainOrder.getLstTrainSettlement();
|
List<OrderTrainResponse.CorpTrainAccountSettlement> lstTrainSettlement = trainOrder.getLstTrainSettlement();
|
||||||
if (lstTrainSettlement != null && !lstTrainSettlement.isEmpty()) {
|
if (lstTrainSettlement != null && !lstTrainSettlement.isEmpty()) {
|
||||||
List<CTripTrainRecordBase> list = lstTrainSettlement.stream()
|
List<CTripTrainRecord> list = lstTrainSettlement.stream()
|
||||||
.flatMap(it -> it.getLstTrainSettlementDetail().stream())
|
.flatMap(it -> it.getLstTrainSettlementDetail().stream())
|
||||||
.map(OrderTrainResponse.CorpTrainSettlementInfo::getTrainSettlementDetail)
|
.map(it ->
|
||||||
.map(CTripTrainRecordBase::changeInfo)
|
CTripTrainRecord.of(CTripTrainRecordBase.changeInfo(it.getTrainSettlementDetail()),
|
||||||
|
CTripTrainInfo.of(it.getTrainSettlementTicket()))
|
||||||
|
)
|
||||||
.toList();
|
.toList();
|
||||||
cTripOrderDetailRepository.saveAllTrainRecord(list);
|
cTripOrderDetailRepository.saveAllCTripTrainRecord(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void cTripCarRecordAutoSave() {
|
public void cTripCarRecordAutoSave() {
|
||||||
OrderCarResponse carOrder = cTripOrderDetailRequest.getCarOrder();
|
OrderCarResponse carOrder = cTripOrderDetailRequest.getCarOrder();
|
||||||
List<OrderCarResponse.CarOrderAccountSettlementDetail> settlementList = carOrder.getCarOrderAccountSettlementList();
|
List<OrderCarResponse.CarOrderAccountSettlementDetail> settlementList = carOrder.getCarOrderAccountSettlementList();
|
||||||
if (settlementList != null && !settlementList.isEmpty()) {
|
if (settlementList != null && !settlementList.isEmpty()) {
|
||||||
List<CTripCarRecordBase> list = settlementList.stream()
|
List<CTripCarRecord> list = settlementList.stream()
|
||||||
.flatMap(it -> it.getCarSettlementDetailList().stream())
|
.flatMap(it -> it.getCarSettlementDetailList().stream())
|
||||||
.map(OrderCarResponse.CarOrderSettlementDetail::getSettlementBaseInfo)
|
.map(it -> CTripCarRecord.of(
|
||||||
.map(CTripCarRecordBase::changeInfo)
|
CTripCarRecordBase.changeInfo(it.getSettlementBaseInfo()),
|
||||||
|
CTripCarQuickInfo.of(it.getOrderDetail().getQuickProductInfo())))
|
||||||
.toList();
|
.toList();
|
||||||
cTripOrderDetailRepository.saveAllCarRecord(list);
|
cTripOrderDetailRepository.saveAllCTripCarRecord(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue