aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-30 17:31:58 +0300
committerGravatar Vitaly Takmazov2016-11-30 17:31:58 +0300
commit92f638429647d328d8a6b6168755b148ec237d3a (patch)
tree194557147827c440def01ca3350b14aba64c5513
parent426d15992bcb2155c1707987d188a0023569c558 (diff)
juick-server: fix recommendations query
-rw-r--r--juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
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))";