From e858e33bf615e354df8b234418162c8b6a9f2025 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 Apr 2018 15:05:47 +0300 Subject: server: fix likes count in feed --- .../src/main/java/com/juick/service/MessagesServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/main') 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 d339d229..609b7e01 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 @@ -784,7 +784,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ + "ON messages.message_id=messages_txt.message_id) " + "INNER JOIN users ON messages.user_id=users.id " + "LEFT JOIN favorites " - + "ON messages.message_id = favorites.message_id " + + "ON messages.message_id = favorites.message_id AND favorites.like_id=1 " + "WHERE messages.message_id IN (:ids) GROUP BY messages.message_id", new MapSqlParameterSource("ids", mids), new MessageMapper()); -- cgit v1.2.3