diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/order/domain/param/OrderQueryParam.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/order/domain/param/OrderQueryParam.java index 6b88f97..6e37f6f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/order/domain/param/OrderQueryParam.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/order/domain/param/OrderQueryParam.java @@ -143,4 +143,32 @@ public class OrderQueryParam implements Serializable this.encryptedCustSearchValue = SM4EncryptUtils.sm4Encrypt(custSearchInfo); } } + + public LocalDateTime getStartDateTime() { + if (this.startDateTime == null) { + this.startDateTime = LocalDateTime.now().minusDays(7); + } + return startDateTime; + } + + public LocalDateTime getEndDateTime() { + if (this.endDateTime == null) { + this.endDateTime = LocalDateTime.now().plusDays(7); + } + return endDateTime; + } + + public LocalDate getStartDate() { + if (this.startDate == null) { + this.startDate = LocalDate.now().minusDays(7); + } + return startDate; + } + + public LocalDate getEndDate() { + if (this.endDate == null) { + this.endDate = LocalDate.now().plusDays(7); + } + return endDate; + } }