aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/ShowQueriesServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/ShowQueriesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/ShowQueriesServiceImpl.java
index e6d43710..0fba35f1 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/ShowQueriesServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/ShowQueriesServiceImpl.java
@@ -51,12 +51,12 @@ public class ShowQueriesServiceImpl extends BaseJdbcService implements ShowQueri
@Override
public List<String> getTopUsers() {
- return getJdbcTemplate().queryForList(
+ 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",
- String.class);
+ (rs, rowNum) -> rs.getString(1));
}
}