fix:修复出现空订单号的问题
This commit is contained in:
parent
def59eaf05
commit
fe764bc2ab
|
@ -209,28 +209,48 @@ public class OrderDetail implements Serializable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrderDetail deepClone(){
|
public OrderDetail deepClone() {
|
||||||
OrderDetail copyOrderDetail = BeanUtil.copyProperties(this, OrderDetail.class);
|
OrderDetail copyOrderDetail = BeanUtil.copyProperties(this, OrderDetail.class);
|
||||||
HotelOrderDetail copiedHotelOrderDetail = BeanUtil.copyProperties(this.hotelOrderDetail, HotelOrderDetail.class);
|
if (this.hotelOrderDetail != null) {
|
||||||
copyOrderDetail.setHotelOrderDetail(copiedHotelOrderDetail);
|
HotelOrderDetail copiedHotelOrderDetail = BeanUtil.copyProperties(this.hotelOrderDetail, HotelOrderDetail.class);
|
||||||
|
copyOrderDetail.setHotelOrderDetail(copiedHotelOrderDetail);
|
||||||
|
} else {
|
||||||
|
copyOrderDetail.setHotelOrderDetail(null);
|
||||||
|
}
|
||||||
|
|
||||||
// 深拷贝 carOrderDetail
|
// 深拷贝 carOrderDetail
|
||||||
CarOrderDetail copiedCarOrderDetail = BeanUtil.copyProperties(this.carOrderDetail, CarOrderDetail.class);
|
if (this.carOrderDetail != null) {
|
||||||
copyOrderDetail.setCarOrderDetail(copiedCarOrderDetail);
|
CarOrderDetail copiedCarOrderDetail = BeanUtil.copyProperties(this.carOrderDetail, CarOrderDetail.class);
|
||||||
|
copyOrderDetail.setCarOrderDetail(copiedCarOrderDetail);
|
||||||
|
} else {
|
||||||
|
copyOrderDetail.setCarOrderDetail(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 深拷贝 flightOrderDetail
|
// 深拷贝 flightOrderDetail
|
||||||
FlightOrderDetail copiedFlightOrderDetail = BeanUtil.copyProperties(this.flightOrderDetail, FlightOrderDetail.class);
|
if (this.flightOrderDetail != null) {
|
||||||
copyOrderDetail.setFlightOrderDetail(copiedFlightOrderDetail);
|
FlightOrderDetail copiedFlightOrderDetail = BeanUtil.copyProperties(this.flightOrderDetail, FlightOrderDetail.class);
|
||||||
|
copyOrderDetail.setFlightOrderDetail(copiedFlightOrderDetail);
|
||||||
|
} else {
|
||||||
|
copyOrderDetail.setFlightOrderDetail(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 深拷贝 trainOrderDetail
|
// 深拷贝 trainOrderDetail
|
||||||
TrainOrderDetail copiedTrainOrderDetail = BeanUtil.copyProperties(this.trainOrderDetail, TrainOrderDetail.class);
|
if (this.trainOrderDetail != null) {
|
||||||
copyOrderDetail.setTrainOrderDetail(copiedTrainOrderDetail);
|
TrainOrderDetail copiedTrainOrderDetail = BeanUtil.copyProperties(this.trainOrderDetail, TrainOrderDetail.class);
|
||||||
|
copyOrderDetail.setTrainOrderDetail(copiedTrainOrderDetail);
|
||||||
|
} else {
|
||||||
|
copyOrderDetail.setTrainOrderDetail(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 深拷贝 otherOrderDetail
|
// 深拷贝 otherOrderDetail
|
||||||
//OtherOrderDetail copiedOtherOrderDetail = BeanUtil.copyProperties(this.otherOrderDetail, OtherOrderDetail.class);
|
//OtherOrderDetail copiedOtherOrderDetail = BeanUtil.copyProperties(this.otherOrderDetail, OtherOrderDetail.class);
|
||||||
copyOrderDetail.setOtherOrderDetail(null);
|
copyOrderDetail.setOtherOrderDetail(null);
|
||||||
|
|
||||||
// 深拷贝 orderEventList
|
// 深拷贝 orderEventList
|
||||||
if(this.orderEventList != null && !this.orderEventList.isEmpty()) {
|
if (this.orderEventList != null && !this.orderEventList.isEmpty()) {
|
||||||
List<OrderEvent> copiedOrderEventList = this.orderEventList.stream()
|
List<OrderEvent> copiedOrderEventList = this.orderEventList.stream()
|
||||||
.map(event -> BeanUtil.copyProperties(event, OrderEvent.class))
|
.map(event -> BeanUtil.copyProperties(event, OrderEvent.class))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
Loading…
Reference in New Issue