Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e2a16d4c
authored
Dec 01, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:消息预警接口新增已读未读过滤
1 parent
4854ec54
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/MsgDao.java
project-order/src/main/java/com/dituhui/pea/order/dto/MsgQuery.java
project-order/src/main/java/com/dituhui/pea/order/dao/MsgDao.java
View file @
e2a16d4
...
...
@@ -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
)
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/MsgQuery.java
View file @
e2a16d4
...
...
@@ -69,4 +69,10 @@ public class MsgQuery {
* 小组ID
*/
private
String
groupId
;
/**
* 是否已读,0:未读,1:已读
*/
private
Integer
isRead
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment