Commit c5b4b1cb484e05acc8c6c0c28f243decc2d1785d
1 parent
eeacdfb1
feat(*): 优化代码
- 优化代码
Showing
1 changed file
with
3 additions
and
1 deletions
fw-hestia-service/src/main/java/cn/fw/hestia/service/buz/MessageCenterBizService.kt
... | ... | @@ -120,7 +120,9 @@ class MessageCenterBizService( |
120 | 120 | sendMsgProducer.send(MessageSendMq(history.id, history.memberId, Date())) |
121 | 121 | redisTemplate.expire(key, 24L, TimeUnit.HOURS) |
122 | 122 | } else { |
123 | - history.sendTime = DateUtil.getExpired(history.sendTime, 1 shl frequency, Calendar.MINUTE) | |
123 | + history.sendTime?.let { | |
124 | + history.sendTime = DateUtil.getExpired(it, 1 shl frequency, Calendar.MINUTE) | |
125 | + } | |
124 | 126 | } |
125 | 127 | messageHistoryService.updateById(history) |
126 | 128 | } | ... | ... |