aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index c405fde4..8f1387cf 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -1156,9 +1156,11 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
return jdbcTemplate.queryForList(
"select subscr_messages.message_id " +
"from subscr_messages inner join messages on subscr_messages.message_id=messages.message_id " +
- "where subscr_messages.suser_id=? and " +
+ "where subscr_messages.suser_id=? " +
+ "AND NOT EXISTS (SELECT 1 FROM bl_users WHERE " +
+ "user_id = ? AND bl_user_id = messages.user_id) AND " +
"messages.replies>subscr_messages.last_read_rid",
- Integer.class, user.getUid());
+ Integer.class, user.getUid(), user.getUid());
}
@Transactional