Commit 3b0d42eaa26aff457824f4943b3440a4e4e8aa41
1 parent
e48a4d3d
调整消息展示时间段
Showing
1 changed file
with
3 additions
and
0 deletions
fw-hestia-service/src/main/java/cn/fw/hestia/service/buz/MessageCenterBizService.java
... | ... | @@ -32,6 +32,7 @@ import org.springframework.stereotype.Service; |
32 | 32 | import org.springframework.transaction.annotation.Transactional; |
33 | 33 | import org.springframework.util.CollectionUtils; |
34 | 34 | |
35 | +import java.time.LocalDateTime; | |
35 | 36 | import java.util.*; |
36 | 37 | import java.util.function.Consumer; |
37 | 38 | import java.util.stream.Collectors; |
... | ... | @@ -138,6 +139,7 @@ public class MessageCenterBizService { |
138 | 139 | .eq(MessageHistory::getMemberId, memberId) |
139 | 140 | .eq(MessageHistory::getReadz, Boolean.FALSE) |
140 | 141 | .eq(MessageHistory::getYn, Boolean.TRUE) |
142 | + .ge(MessageHistory::getSendTime, DateUtil.localDateTime2Date(LocalDateTime.now().minusMonths(3L))) | |
141 | 143 | ); |
142 | 144 | } |
143 | 145 | |
... | ... | @@ -168,6 +170,7 @@ public class MessageCenterBizService { |
168 | 170 | PageData<MessageHistory> pageData = messageHistoryService.page(new PageData<>(query), Wrappers.<MessageHistory>lambdaQuery() |
169 | 171 | .eq(MessageHistory::getMemberId, query.getMemberId()) |
170 | 172 | .eq(MessageHistory::getYn, Boolean.TRUE) |
173 | + .ge(MessageHistory::getSendTime, DateUtil.localDateTime2Date(LocalDateTime.now().minusMonths(3L))) | |
171 | 174 | .orderByDesc(MessageHistory::getCreateTime) |
172 | 175 | ); |
173 | 176 | AppPage<MessageHistoryVO> page = AppPage.empty(query); | ... | ... |