Commit e2a16d4c by Ren Ping

feat:消息预警接口新增已读未读过滤

1 parent 4854ec54
......@@ -21,6 +21,7 @@ public interface MsgDao extends JpaRepository<MsgEntity, Integer> {
" where IF(:#{#req.startDate} is not null, tt.create_time>=:#{#req.startDate}, 1=1)" +
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 1=1)" +
" and IF(:#{#req.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
" and IF(:#{#req.isRead} is not null, r.is_read = :#{#req.isRead}, 1=1)" +
" and IF(:#{#req.clusterId} is not null, tt.cluster_id=:#{#req.clusterId}, 1=1)" +
" and IF(:#{#req.branchId} is not null, tt.branch_id=:#{#req.branchId}, 1=1)" +
" and IF(:#{#req.groupId} is not null, tt.group_id=:#{#req.groupId}, 1=1)" +
......@@ -32,6 +33,7 @@ public interface MsgDao extends JpaRepository<MsgEntity, Integer> {
" from zzz_msg tt join zzz_msg_receiver r on r.msg_id=tt.id and r.user_id=:#{#req.userId}" +
" where IF(:#{#req.startDate} is not null, tt.create_time>=:#{#req.startDate}, 1=1)" +
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 1=1)" +
" and IF(:#{#req.isRead} is not null, r.is_read = :#{#req.isRead}, 1=1)" +
" and IF(:#{#req.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
" and IF(:#{#req.clusterId} is not null, tt.cluster_id=:#{#req.clusterId}, 1=1)" +
" and IF(:#{#req.branchId} is not null, tt.branch_id=:#{#req.branchId}, 1=1)" +
......@@ -52,6 +54,7 @@ public interface MsgDao extends JpaRepository<MsgEntity, Integer> {
" and IF(:#{#req.startDate} is not null, tt.create_time>=:#{#req.startDate}, 1=1)" +
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 1=1)" +
" and IF(:#{#req.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
" and IF(:#{#req.isRead} is not null, r.is_read = :#{#req.isRead}, 1=1)" +
") t"
, nativeQuery = true
)
......
......@@ -69,4 +69,10 @@ public class MsgQuery {
* 小组ID
*/
private String groupId;
/**
* 是否已读,0:未读,1:已读
*/
private Integer isRead;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!