diff options
author | Vitaly Takmazov | 2016-07-07 12:29:20 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-07-07 12:29:20 +0300 |
commit | 4715cbed779182ae8e234acb46508f24a5a5f5d6 (patch) | |
tree | 244372717cc2abdddbdb652c23d5d3de8fccefa4 /src/main/java | |
parent | e0334bd9adc4fe06cf6e7bad6fde87fc70a3ea19 (diff) |
fix recommendations query
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/server/SubscriptionsQueries.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/SubscriptionsQueries.java b/src/main/java/com/juick/server/SubscriptionsQueries.java index 0cf3f169..7c30285b 100644 --- a/src/main/java/com/juick/server/SubscriptionsQueries.java +++ b/src/main/java/com/juick/server/SubscriptionsQueries.java @@ -62,7 +62,7 @@ public class SubscriptionsQueries { public static List<User> getUsersSubscribedToUserRecommendations(JdbcTemplate sql, int uid, int mid, int muid) { List<Integer> tags = MessagesQueries.getMessageTagsIDs(sql, mid); - String query = "SELECT user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=" + uid + ")"; + String query = "SELECT suser_id FROM subscr_users WHERE user_id=" + uid; query += " AND user_id NOT IN (SELECT user_id FROM bl_users WHERE bl_user_id=" + muid + ")"; query += " AND user_id NOT IN (SELECT suser_id FROM subscr_users WHERE user_id=" + muid + ")"; query += " AND user_id NOT IN (SELECT suser_id FROM subscr_messages WHERE message_id=" + mid + ")"; |