diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java index 2f2b27e7..8ef1427c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/message/NotifyMessageBaseVO.java @@ -56,7 +56,14 @@ public class NotifyMessageBaseVO { @Schema(description = "阅读时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime readTime; - + /** + * 消息开始时间 + */ + private LocalDateTime startTime; + /** + * 截止时间 + */ + private LocalDateTime endTime; /** * 业务类型 */ diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageServiceImpl.java index 48aec1d4..bc0df9c8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/notify/NotifyMessageServiceImpl.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.time.LocalDateTime; import java.util.Collection; import java.util.HashMap; import java.util.List; @@ -37,7 +38,7 @@ public class NotifyMessageServiceImpl implements NotifyMessageService { NotifyMessageDO message = new NotifyMessageDO().setUserId(userId).setUserType(userType) .setTemplateId(template.getId()).setTemplateCode(template.getCode()) .setTemplateType(template.getType()).setTemplateNickname(template.getNickname()) - .setTemplateContent(templateContent).setTemplateParams(templateParams).setReadStatus(false).setBillType(billType).setExtraData(extraData).setJumpFlag(jumpFlag); + .setTemplateContent(templateContent).setTemplateParams(templateParams).setReadStatus(false).setBillType(billType).setStartTime(LocalDateTime.now()).setExtraData(extraData).setJumpFlag(jumpFlag); if (extraData.containsKey("billId")) { message.setBillId(Long.valueOf(extraData.get("billId").toString())); }