aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-02 09:47:48 +0300
committerGravatar Vitaly Takmazov2019-10-02 09:47:48 +0300
commit51ff8e2d57e196f1ced45887a1cd23e941f32f20 (patch)
tree04f5945cef57194dbbff7ea1b41c353d7cb3c258 /src/main/java/com
parentae550feea0394bfff147fa1946cfa8c357eacb8a (diff)
Fix unread SQL
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index a190a112..8bcf47d3 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -896,7 +896,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "messages.attach,COUNT(DISTINCT favorites.user_id) AS likes,messages.hidden,"
+ "GROUP_CONCAT(tags.name SEPARATOR ' '), messages_txt.repliesby, messages_txt.txt, '' as q, "
+ "messages.updated, 0 as to_uid, NULL as to_name, messages_txt.updated_at, '' as m_user_uri, "
- + "'' as to_uri, '' as msg_reply_uri, 0 as html, messages.replies-subscr_messages.last_read_rid>0 as unread "
+ + "'' as to_uri, '' as msg_reply_uri, 0 as html, cast(messages.replies as signed)-cast(subscr_messages.last_read_rid as signed) > 0 as unread "
+ "FROM (messages INNER JOIN messages_txt "
+ "ON messages.message_id=messages_txt.message_id) "
+ "INNER JOIN users ON messages.user_id=users.id "