aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/MessagesQueries.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-17 01:36:57 +0300
committerGravatar Vitaly Takmazov2016-01-17 01:36:57 +0300
commit8ae5d9e3ce643bf0b8488c4566eff133b2cb2f11 (patch)
treeab1bc0447fa30a9bbd5198799ad33eab8e386498 /src/main/java/com/juick/server/MessagesQueries.java
parent27e4beeb2ed195985942262f3f94a8c5b069ba66 (diff)
fix replyidincrement
Diffstat (limited to 'src/main/java/com/juick/server/MessagesQueries.java')
-rw-r--r--src/main/java/com/juick/server/MessagesQueries.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/MessagesQueries.java b/src/main/java/com/juick/server/MessagesQueries.java
index bcb2d08d..422cfe7d 100644
--- a/src/main/java/com/juick/server/MessagesQueries.java
+++ b/src/main/java/com/juick/server/MessagesQueries.java
@@ -119,7 +119,8 @@ public class MessagesQueries {
}
public static int getReplyIDIncrement(JdbcTemplate sql, int mid) {
- return sql.update("UPDATE messages SET maxreplyid=maxreplyid+1 WHERE message_id=?", mid);
+ sql.update("UPDATE messages SET maxreplyid=maxreplyid+1 WHERE message_id=?", mid);
+ return sql.queryForObject("SELECT maxreplyid FROM messages WHERE message_id=?", new Object[] {mid}, Integer.class);
}
public static boolean recommendMessage(JdbcTemplate sql, int mid, int vuid) {