aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-20 15:05:47 +0300
committerGravatar Vitaly Takmazov2018-04-20 15:05:47 +0300
commite858e33bf615e354df8b234418162c8b6a9f2025 (patch)
tree9aaa7577a5e1fa20d9e47897ecd25f13a19be74c /juick-server-jdbc/src/main/java/com/juick/service
parent0f0009ff1c86fd8ae3af122851034eac21645e11 (diff)
server: fix likes count in feed
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick/service')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
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());