diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java index 5b80f93..c149068 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java @@ -39,10 +39,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import javax.validation.Valid; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.Year; -import java.time.YearMonth; +import java.time.*; import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -119,12 +116,8 @@ public class MessagePushRecordServiceImpl extends BaseServiceImpl getQueryWrapper(MessagePushRecordEntity request) { LambdaQueryWrapper lambda = Condition.getQueryWrapper(request).lambda(); - if (Func.isNotEmpty(request.getStartTime())) { - lambda.ge(MessagePushRecordEntity::getPushTime, request.getStartTime()); - } - if (Func.isNotEmpty(request.getEndTime())) { - lambda.le(MessagePushRecordEntity::getPushTime, request.getEndTime()); - } + lambda.ge(Func.isNotEmpty(request.getStartTime()),MessagePushRecordEntity::getPushTime, LocalDateTime.of(request.getStartTime(), LocalTime.MIN)); + lambda.le(Func.isNotEmpty(request.getEndTime()),MessagePushRecordEntity::getPushTime, LocalDateTime.of(request.getEndTime(), LocalTime.MAX)); lambda.orderByDesc(MessagePushRecordEntity::getPushTime); return lambda; }