aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-16 14:14:27 +0300
committerGravatar Vitaly Takmazov2018-04-16 14:14:27 +0300
commit350f6942078e67b15e160ecffc913ba0cef624be (patch)
treead52a91b540c85a9249ebbf35490110aa36f5bcb /juick-server-jdbc/src
parent73afea037564c2565744d9e12a078dcf0a230a71 (diff)
server: do not make last read mark lower
Diffstat (limited to 'juick-server-jdbc/src')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
index 996fb550..c0dccc6a 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -921,7 +921,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
@Transactional
@Override
public void setLastReadComment(User user, Integer mid, Integer rid) {
- jdbcTemplate.update("UPDATE subscr_messages SET last_read_rid=? WHERE message_id=? AND suser_id=?",
+ jdbcTemplate.update("UPDATE subscr_messages SET last_read_rid=GREATEST(?, last_read_rid) WHERE message_id=? AND suser_id=?",
rid, mid, user.getUid());
}