Browse Source

# 消息推送定时任务推送规则修改

zhongwei
haungxing 2 years ago
parent
commit
e76f29b771
  1. 4
      hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java

4
hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java

@ -24,7 +24,9 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.stereotype.Component;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -59,7 +61,7 @@ public class MessagePushSchedule {
LambdaQueryWrapper<MessagePushRecordEntity> lqw = Wrappers.<MessagePushRecordEntity>lambdaQuery()
.eq(MessagePushRecordEntity::getStatus, MessageConstants.NOT_PUSH)
.eq(MessagePushRecordEntity::getTemplateId,template.getId())
.ge(MessagePushRecordEntity::getPlanTime, now)
.ge(MessagePushRecordEntity::getPlanTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIN))
.le(MessagePushRecordEntity::getPlanTime, endTime);
List<MessagePushRecordEntity> list = recordService.list(lqw);
if(CollectionUtil.isEmpty(list) || list.size() == 0) {

Loading…
Cancel
Save