aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-03 23:41:26 +0300
committerGravatar Vitaly Takmazov2018-12-03 23:41:26 +0300
commit412c66599f7ba9b0865aedc57d3615dda1e338b1 (patch)
tree1b97f2b320a3e04ef5e3325fc283575fc61fe165
parent9dedf235324ba6cb98709e5b03df2adb2b9c5617 (diff)
fix favorites grouping
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index f6723260..4e5dca81 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -872,7 +872,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "messages.readonly,messages.privacy, messages.replies-COUNT(DISTINCT banned.reply_id) as replies,"
+ "messages.attach,COUNT(DISTINCT favorites.user_id) AS likes,messages.hidden,"
+ "messages_txt.tags,messages_txt.repliesby, messages_txt.txt, '' as q, "
- + "messages.updated, 0 as to_uid, NULL as to_name, messages_txt.updated_at, '' as user_uri, "
+ + "messages.updated, 0 as to_uid, NULL as to_name, messages_txt.updated_at, '' as m_user_uri, "
+ "'' as to_uri, '' as msg_reply_uri, 0 as html "
+ "FROM (messages INNER JOIN messages_txt "
+ "ON messages.message_id=messages_txt.message_id) "
@@ -885,7 +885,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "messages.message_id, rid, replyto, messages.user_id, users.nick, usr_banned, messages.ts, "
+ "messages.readonly, messages.privacy, messages.attach, messages.hidden, messages_txt.tags, "
+ "messages_txt.repliesby, messages_txt.txt, q, messages.updated, to_uid, to_name, updated_at, "
- + "user_uri, msg_reply_uri, html",
+ + "m_user_uri, msg_reply_uri, html",
new MapSqlParameterSource("ids", mids)
.addValue("uid", visitor.getUid()),
new MessageMapper());