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 3450ed1d
authored
Oct 24, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息模块开发
1 parent
15bc3632
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
.gitignore
project-order/src/main/java/com/dituhui/pea/order/controller/MsgController.java
project-order/src/main/java/com/dituhui/pea/order/dao/MsgDao.java
.gitignore
View file @
3450ed1
...
...
@@ -8,6 +8,7 @@
/*/.classpath
/*/.project
/*/logs/
/logs/
/*/.gitignore
dispatchSolution-*.json
/project-order/src/main/resources/application-dev.yaml
...
...
project-order/src/main/java/com/dituhui/pea/order/controller/MsgController.java
View file @
3450ed1
...
...
@@ -17,7 +17,7 @@ import javax.validation.Valid;
import
java.util.Objects
;
/**
* 消息
相关接口
* 消息
*
* @author RenPing
* @date 2023/10/24
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/MsgDao.java
View file @
3450ed1
...
...
@@ -24,8 +24,16 @@ public interface MsgDao extends JpaRepository<MsgEntity, Long> {
" 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)"
+
"group by tt.cluster_id,tt.branch_id,tt.group_id"
+
") t"
//, countProjection = "t.id" //用于分页计数
") t"
,
countQuery
=
"select count(t.cluster_id)"
+
" from ("
+
" select tt.cluster_id,tt.branch_id,tt.group_id,min(tt.create_time) create_time,min(r.is_read) is_read"
+
" 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.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)"
+
"group by tt.cluster_id,tt.branch_id,tt.group_id"
+
") t"
,
nativeQuery
=
true
// 开启原生sql
)
Page
<
Map
<
String
,
Objects
>>
getGroupList
(
@Param
(
"req"
)
MsgDTO
.
Request
req
,
Pageable
pageable
);
...
...
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