From 37235eb6f392005b91fcd005c9f645f4e36b82d1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 19 Dec 2016 14:14:30 +0300 Subject: juick-server: fix getRecommendedUsers query --- .../src/main/java/com/juick/service/ShowQueriesServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server') diff --git a/juick-server/src/main/java/com/juick/service/ShowQueriesServiceImpl.java b/juick-server/src/main/java/com/juick/service/ShowQueriesServiceImpl.java index 50e0d243..2362e948 100644 --- a/juick-server/src/main/java/com/juick/service/ShowQueriesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/ShowQueriesServiceImpl.java @@ -28,7 +28,7 @@ public class ShowQueriesServiceImpl extends BaseJdbcService implements ShowQueri return Collections.emptyList(); return getNamedParameterJdbcTemplate().queryForList( - "SELECT users.nick FROM subscr_users su1 INNER JOIN users u " + + "SELECT u.nick FROM subscr_users su1 INNER JOIN users u " + "ON su1.user_id = u.id " + "WHERE NOT EXISTS (SELECT 1 FROM subscr_users su2 WHERE su2.suser_id = :uid and su1.user_id = su2.user_id) " + "AND EXISTS (SELECT 1 FROM subscr_users su3 WHERE su3.suser_id = :uid and su3.user_id = su1.suser_id ) " + -- cgit v1.2.3