Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
67529872
Commit
67529872
authored
Aug 13, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
圈子消息通知-插入
parent
1d7f74fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
NotificationService.java
...java/com/tanpu/community/service/NotificationService.java
+9
-5
No files found.
community-service/src/main/java/com/tanpu/community/service/NotificationService.java
View file @
67529872
...
...
@@ -31,7 +31,9 @@ public class NotificationService {
.
notifiedUserId
(
notifierId
)
.
messageType
(
type
.
getCode
())
.
content
(
content
)
.
operatorId
(
targetId
).
build
();
.
operatorId
(
operatorId
)
.
targetId
(
targetId
)
.
build
();
insert
(
entity
);
}
...
...
@@ -64,7 +66,7 @@ public class NotificationService {
}
else
{
NotificationLikeDO
notificationLikeDO
=
new
NotificationLikeDO
();
notificationLikeDO
.
addItem
(
operatorId
);
NotificationEntity
.
builder
().
operatorId
(
operatorId
)
NotificationEntity
build
=
NotificationEntity
.
builder
().
operatorId
(
operatorId
)
.
notificationId
(
uuidGenHelper
.
getUuidStr
())
.
messageType
(
NotificationTypeEnum
.
LIKE
.
getCode
())
.
notifiedUserId
(
notifierId
)
...
...
@@ -72,8 +74,9 @@ public class NotificationService {
.
targetId
(
targetId
)
.
operatorId
(
operatorId
)
.
build
();
insert
(
build
);
}
insert
(
entity
);
}
@Transactional
...
...
@@ -94,14 +97,15 @@ public class NotificationService {
LambdaQueryWrapper
<
NotificationEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<
NotificationEntity
>()
.
eq
(
NotificationEntity:
:
getNotifiedUserId
,
userId
)
.
lt
(
NotificationEntity:
:
get
Cre
ateTime
,
lastOne
.
getCreateTime
())
.
lt
(
NotificationEntity:
:
get
Upd
ateTime
,
lastOne
.
getCreateTime
())
.
last
(
"limit "
+
pageSize
);
if
(!
NotificationTypeEnum
.
ALL
.
getCode
().
equals
(
type
)){
queryWrapper
.
eq
(
NotificationEntity:
:
getMessageType
,
type
);
}
return
notificationMapper
.
selectList
(
queryWrapper
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment