diff options
Diffstat (limited to 'src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index 940cdaba..105b86cf 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -1084,6 +1084,15 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ rid, mid, user.getUid()); } + @Override + public void setAllRead(User user) { + jdbcTemplate.update(""" + update subscr_messages set last_read_rid=total.replies FROM messages + INNER JOIN messages total on total.message_id=messages.message_id + WHERE messages.message_id=subscr_messages.message_id AND subscr_messages.suser_id=? + """, user.getUid()); + } + @Transactional @Override public void setRead(User user, Integer mid) { |