From 92f638429647d328d8a6b6168755b148ec237d3a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 30 Nov 2016 17:31:58 +0300 Subject: juick-server: fix recommendations query --- .../src/main/java/com/juick/service/SubscriptionServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com/juick') diff --git a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java index fa8d4041..bd915961 100644 --- a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -100,7 +100,7 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip " AND NOT EXISTS (SELECT 1 FROM bl_users b WHERE b.bl_user_id = :muid and b.user_id = s.user_id) " + " AND NOT EXISTS (SELECT 1 FROM subscr_users s1 WHERE s1.user_id = :muid AND s.user_id = s1.suser_id) " + " AND NOT EXISTS (SELECT 1 FROM subscr_messages sm WHERE sm.message_id = :mid AND s.user_id = sm.suser_id) " + - " AND NOT EXISTS (SELECT 1 FROM favorites WHERE f.message_id = :mid AND f.user_id = s.user_id) " + + " AND NOT EXISTS (SELECT 1 FROM favorites WHERE favorites.message_id = :mid AND favorites.user_id = s.user_id) " + " AND s.user_id NOT IN (SELECT s2.suser_id FROM subscr_users s2 " + " INNER JOIN favorites f ON (f.message_id = :mid AND s2.user_id = f.user_id AND f.user_id != :uid))"; -- cgit v1.2.3