Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
tanghaihao 1 year ago
parent
commit
ee3b8f3b7f
  1. 13
      hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java

13
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 org.springframework.util.Assert;
import javax.validation.Valid; import javax.validation.Valid;
import java.time.LocalDate; import java.time.*;
import java.time.LocalDateTime;
import java.time.Year;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -119,12 +116,8 @@ public class MessagePushRecordServiceImpl extends BaseServiceImpl<MessagePushRec
*/ */
private LambdaQueryWrapper<MessagePushRecordEntity> getQueryWrapper(MessagePushRecordEntity request) { private LambdaQueryWrapper<MessagePushRecordEntity> getQueryWrapper(MessagePushRecordEntity request) {
LambdaQueryWrapper<MessagePushRecordEntity> lambda = Condition.getQueryWrapper(request).lambda(); LambdaQueryWrapper<MessagePushRecordEntity> lambda = Condition.getQueryWrapper(request).lambda();
if (Func.isNotEmpty(request.getStartTime())) { lambda.ge(Func.isNotEmpty(request.getStartTime()),MessagePushRecordEntity::getPushTime, LocalDateTime.of(request.getStartTime(), LocalTime.MIN));
lambda.ge(MessagePushRecordEntity::getPushTime, request.getStartTime()); lambda.le(Func.isNotEmpty(request.getEndTime()),MessagePushRecordEntity::getPushTime, LocalDateTime.of(request.getEndTime(), LocalTime.MAX));
}
if (Func.isNotEmpty(request.getEndTime())) {
lambda.le(MessagePushRecordEntity::getPushTime, request.getEndTime());
}
lambda.orderByDesc(MessagePushRecordEntity::getPushTime); lambda.orderByDesc(MessagePushRecordEntity::getPushTime);
return lambda; return lambda;
} }

Loading…
Cancel
Save