From 18094466ae8aae8a5c2e74fa18ba3f49d2c9fabf Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 9 Apr 2019 23:11:18 +0300 Subject: Fix likes counter while fixing tests on mysql --- src/main/java/com/juick/service/MessagesServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/juick') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index ce9185d9..5e36093e 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -372,7 +372,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ + "messages.readonly, messages.privacy, messages.replies," + "messages.attach, COUNT(DISTINCT favorites.user_id) as likes, messages.hidden," + "GROUP_CONCAT(tags.name SEPARATOR ' '), txt.repliesby, txt.txt, '' as q, messages.updated as updated, 0 as to_uid, " - + "NULL as to_name, txt.updated_at, '' as user_uri, '' as to_uri, '' as reply_uri, 0 as html FROM messages " + + "NULL as to_name, txt.updated_at, '' as reply_user_uri, '' as to_uri, '' as reply_uri, 0 as html FROM messages " + "INNER JOIN users ON messages.user_id = users.id " + "INNER JOIN messages_txt AS txt " + "ON messages.message_id = txt.message_id " @@ -382,7 +382,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ + "LEFT JOIN tags ON tags.tag_id=messages_tags.tag_id " + "WHERE messages.message_id = ? " + "GROUP BY mid, rid, replyto, uid, nick, banned, messages.ts, readonly, " - + "privacy, replies, attach, repliesby, q, updated_at, user_uri, to_uri, reply_uri, html", + + "privacy, replies, attach, repliesby, q, updated_at, reply_user_uri, to_uri, reply_uri, html", new MessageMapper(), mid); if (!list.isEmpty()) { -- cgit v1.2.3