From 412c66599f7ba9b0865aedc57d3615dda1e338b1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 3 Dec 2018 23:41:26 +0300 Subject: fix favorites grouping --- src/main/java/com/juick/service/MessagesServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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()); -- cgit v1.2.3