diff options
author | Vitaly Takmazov | 2023-01-18 11:39:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-18 11:39:05 +0300 |
commit | 118464cfdabdad2b943e959e14ceb3012642a301 (patch) | |
tree | 6b5af9ecccaabc422478a2739667bc50380bf396 /src/main/java/com/juick/service/ShowQueriesServiceImpl.java | |
parent | 1c96e74ad675c3a7d1b6ab2bb01307a94b8d4212 (diff) |
Drop unused `useroptions` table
Diffstat (limited to 'src/main/java/com/juick/service/ShowQueriesServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/ShowQueriesServiceImpl.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/juick/service/ShowQueriesServiceImpl.java b/src/main/java/com/juick/service/ShowQueriesServiceImpl.java index 426ed9f2..15e8f875 100644 --- a/src/main/java/com/juick/service/ShowQueriesServiceImpl.java +++ b/src/main/java/com/juick/service/ShowQueriesServiceImpl.java @@ -51,12 +51,11 @@ public class ShowQueriesServiceImpl extends BaseJdbcService implements ShowQueri @Override public List<String> getTopUsers() { - return getJdbcTemplate().query( - "SELECT users.nick,COUNT(subscr_users.suser_id) AS cnt " + - "FROM (subscr_users INNER JOIN users ON subscr_users.user_id=users.id) " + - "INNER JOIN useroptions ON users.id=useroptions.user_id " + - "WHERE useroptions.privacy_view>0 AND users.lastmessage > UNIX_TIMESTAMP() - 259200 " + - "AND users.id!=2 GROUP BY subscr_users.user_id ORDER BY cnt DESC LIMIT 10", + return getJdbcTemplate().query(""" + SELECT users.nick,COUNT(subscr_users.suser_id) AS cnt + FROM (subscr_users INNER JOIN users ON subscr_users.user_id=users.id) + WHERE users.lastmessage > UNIX_TIMESTAMP() - 259200 + AND users.id!=2 GROUP BY subscr_users.user_id ORDER BY cnt DESC LIMIT 10""", (rs, rowNum) -> rs.getString(1)); } } |