diff options
-rw-r--r-- | juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java index aa3e454f..d7c1d51b 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -482,7 +482,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ return getNamedParameterJdbcTemplate().queryForList( "SELECT message_id FROM subscr_messages WHERE suser_id = :uid" + (before > 0 ? - " AND message_id < :before " : "") + + " AND message_id < :before " : " ") + "ORDER BY message_id DESC LIMIT 20", sqlParameterSource, Integer.class); |