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
b8030743
Commit
b8030743
authored
Aug 30, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点赞评论消息通知 fix
parent
7015eb81
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
NotificationManager.java
...java/com/tanpu/community/manager/NotificationManager.java
+17
-12
NotificationService.java
...java/com/tanpu/community/service/NotificationService.java
+4
-2
No files found.
community-service/src/main/java/com/tanpu/community/manager/NotificationManager.java
View file @
b8030743
...
...
@@ -126,6 +126,9 @@ public class NotificationManager {
if
(
NotificationTypeEnum
.
COMMENT_LIKE
.
getCode
().
equals
(
themeNotifyQo
.
getMessageType
()))
{
CommentEntity
commentEntity
=
commentService
.
queryByCommentId
(
themeNotifyQo
.
getCommentId
());
if
(
commentEntity
!=
null
){
themeNotifyQo
.
setContent
(
null
);
}
else
{
themeNotifyQo
.
setFormerThemeId
(
commentEntity
.
getThemeId
());
themeNotifyQo
.
setContent
(
commentEntity
.
getContent
());
ThemeEntity
themeEntity
=
themeService
.
queryByThemeId
(
commentEntity
.
getThemeId
());
...
...
@@ -141,6 +144,8 @@ public class NotificationManager {
}
}
}
}
// 外部话题
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
themeNotifyQo
.
setTopicTitle
(
topicService
.
queryTitleById
(
themeNotifyQo
.
getTopicId
()));
...
...
community-service/src/main/java/com/tanpu/community/service/NotificationService.java
View file @
b8030743
...
...
@@ -226,10 +226,12 @@ public class NotificationService {
}
// 删除评论及缓存
// 删除评论及缓存
,并更新
public
void
deleteCommentNotify
(
String
notifyUserId
,
String
operatorId
,
String
commentId
,
LocalDateTime
commentTime
)
{
// 物理删除
NotificationEntity
commentNotify
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>().
eq
(
NotificationEntity:
:
getTargetId
,
commentId
));
NotificationEntity
commentNotify
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>()
.
eq
(
NotificationEntity:
:
getTargetId
,
commentId
)
.
eq
(
NotificationEntity:
:
getMessageType
,
NotificationTypeEnum
.
COMMENT
.
getType
()));
NotificationEntity
last
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>().
eq
(
NotificationEntity:
:
getNotifiedUserId
,
notifyUserId
)
.
orderByDesc
(
NotificationEntity:
:
getUpdateTime
)
.
last
(
"limit 1"
));
...
...
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