diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripCarRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripCarRecord.java index 590ba38b..7b655710 100644 --- a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripCarRecord.java +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripCarRecord.java @@ -9,6 +9,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serial; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.Objects; @Data @Table("c_trip_car_record") @@ -33,7 +34,7 @@ public class CTripCarRecord implements Serializable { @MappedCollection(idColumn = "c_trip_car_record_id") private CTripCarPassengerInfo cTripCarPassengerInfo; - public static CTripCarRecord of(CTripCarRecordBase cTripCarRecordBase, CTripCarQuickInfo cTripCarQuickInfo , CTripCarPassengerInfo cTripCarPassengerInfo) { + public static CTripCarRecord of(CTripCarRecordBase cTripCarRecordBase, CTripCarQuickInfo cTripCarQuickInfo, CTripCarPassengerInfo cTripCarPassengerInfo) { CTripCarRecord cTripCarRecord = new CTripCarRecord(); cTripCarRecord.setCTripCarQuickInfo(cTripCarQuickInfo); cTripCarRecord.setCTripCarRecordBase(cTripCarRecordBase); @@ -42,4 +43,17 @@ public class CTripCarRecord implements Serializable { cTripCarRecord.setCTripCarPassengerInfo(cTripCarPassengerInfo); return cTripCarRecord; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CTripCarRecord that = (CTripCarRecord) o; + return Objects.equals(recordId, that.recordId) && Objects.equals(createTime, that.createTime) && Objects.equals(routeOrderNo, that.routeOrderNo) && Objects.equals(orderDate, that.orderDate) && Objects.equals(bookingUserName, that.bookingUserName) && Objects.equals(bookingUserCode, that.bookingUserCode) && Objects.equals(bookingUserPhone, that.bookingUserPhone) && Objects.equals(userName, that.userName) && Objects.equals(userCode, that.userCode) && Objects.equals(cTripCarRecordBase, that.cTripCarRecordBase) && Objects.equals(cTripCarQuickInfo, that.cTripCarQuickInfo) && Objects.equals(cTripCarPassengerInfo, that.cTripCarPassengerInfo); + } + + @Override + public int hashCode() { + return Objects.hash(recordId, createTime, routeOrderNo, orderDate, bookingUserName, bookingUserCode, bookingUserPhone, userName, userCode, cTripCarRecordBase, cTripCarQuickInfo, cTripCarPassengerInfo); + } } diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java index 9256c182..35f9ba24 100644 --- a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java @@ -9,6 +9,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serial; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.Objects; @Data @Table("c_trip_flight_record") @@ -55,4 +56,17 @@ public class CTripFlightRecord implements Serializable { this.setCTripFlightPrintInfo(cTripFlightPrintInfo); return this; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CTripFlightRecord that = (CTripFlightRecord) o; + return Objects.equals(recordId, that.recordId) && Objects.equals(createTime, that.createTime) && Objects.equals(routeOrderNo, that.routeOrderNo) && Objects.equals(ticketNo, that.ticketNo) && Objects.equals(bookingUserName, that.bookingUserName) && Objects.equals(bookingUserCode, that.bookingUserCode) && Objects.equals(bookingUserPhone, that.bookingUserPhone) && Objects.equals(userName, that.userName) && Objects.equals(userCode, that.userCode) && Objects.equals(cTripFlightRecordBase, that.cTripFlightRecordBase) && Objects.equals(cTripFlightInfo, that.cTripFlightInfo) && Objects.equals(cTripFlightBaseInfo, that.cTripFlightBaseInfo) && Objects.equals(cTripFlightTripInfo, that.cTripFlightTripInfo) && Objects.equals(cTripFlightPrintInfo, that.cTripFlightPrintInfo); + } + + @Override + public int hashCode() { + return Objects.hash(recordId, createTime, routeOrderNo, ticketNo, bookingUserName, bookingUserCode, bookingUserPhone, userName, userCode, cTripFlightRecordBase, cTripFlightInfo, cTripFlightBaseInfo, cTripFlightTripInfo, cTripFlightPrintInfo); + } } diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripHotelRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripHotelRecord.java index 1c9fd0df..ffb5080d 100644 --- a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripHotelRecord.java +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripHotelRecord.java @@ -9,6 +9,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serial; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.Objects; @Data @Table("c_trip_hotel_record") @@ -41,4 +42,17 @@ public class CTripHotelRecord implements Serializable { cTripHotelRecord.setCreateTime(DateTimeUtil.strToTimeMM(cTripHotelRecordBase.getCreateTime())); return cTripHotelRecord; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CTripHotelRecord that = (CTripHotelRecord) o; + return Objects.equals(recordId, that.recordId) && Objects.equals(createTime, that.createTime) && Objects.equals(routeOrderNo, that.routeOrderNo) && Objects.equals(bookingUserName, that.bookingUserName) && Objects.equals(bookingUserCode, that.bookingUserCode) && Objects.equals(bookingUserPhone, that.bookingUserPhone) && Objects.equals(userName, that.userName) && Objects.equals(userCode, that.userCode) && Objects.equals(cTripHotelRecordBase, that.cTripHotelRecordBase) && Objects.equals(cTripHotelInfo, that.cTripHotelInfo) && Objects.equals(cTripHotelOrderDetail, that.cTripHotelOrderDetail); + } + + @Override + public int hashCode() { + return Objects.hash(recordId, createTime, routeOrderNo, bookingUserName, bookingUserCode, bookingUserPhone, userName, userCode, cTripHotelRecordBase, cTripHotelInfo, cTripHotelOrderDetail); + } }