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
dc2f667c
Commit
dc2f667c
authored
Aug 30, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点赞评论消息通知 fix
parent
b8030743
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+1
-1
NotificationService.java
...java/com/tanpu/community/service/NotificationService.java
+2
-1
No files found.
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
dc2f667c
...
@@ -411,7 +411,7 @@ public class ThemeManager {
...
@@ -411,7 +411,7 @@ public class ThemeManager {
// 消息通知
// 消息通知
ThemeEntity
formerTheme
=
themeService
.
queryByThemeId
(
req
.
getFormerThemeId
());
ThemeEntity
formerTheme
=
themeService
.
queryByThemeId
(
req
.
getFormerThemeId
());
if
(
formerTheme
!=
null
){
if
(
formerTheme
!=
null
){
notificationService
.
insertForward
(
userId
,
formerTheme
.
getAuthorId
(),
formerTheme
.
getThemeId
(),
req
.
getTopicId
(),
req
.
getContent
().
get
(
0
).
getValue
(),
themeEntity
.
getThemeId
());
notificationService
.
insertForward
(
userId
,
formerTheme
.
getAuthorId
(),
themeEntity
.
getThemeId
(),
req
.
getTopicId
(),
req
.
getContent
().
get
(
0
).
getValue
(),
themeEntity
.
getThemeId
());
notificationService
.
putNotifyCache
(
formerTheme
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
FORWARD
);
notificationService
.
putNotifyCache
(
formerTheme
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
FORWARD
);
}
}
...
...
community-service/src/main/java/com/tanpu/community/service/NotificationService.java
View file @
dc2f667c
...
@@ -226,11 +226,12 @@ public class NotificationService {
...
@@ -226,11 +226,12 @@ public class NotificationService {
}
}
// 删除评论及缓存,并更新
// 删除评论
通知
及缓存,并更新
public
void
deleteCommentNotify
(
String
notifyUserId
,
String
operatorId
,
String
commentId
,
LocalDateTime
commentTime
)
{
public
void
deleteCommentNotify
(
String
notifyUserId
,
String
operatorId
,
String
commentId
,
LocalDateTime
commentTime
)
{
// 物理删除
// 物理删除
NotificationEntity
commentNotify
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>()
NotificationEntity
commentNotify
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>()
.
eq
(
NotificationEntity:
:
getTargetId
,
commentId
)
.
eq
(
NotificationEntity:
:
getTargetId
,
commentId
)
.
eq
(
NotificationEntity:
:
getOperatorId
,
operatorId
)
.
eq
(
NotificationEntity:
:
getMessageType
,
NotificationTypeEnum
.
COMMENT
.
getType
()));
.
eq
(
NotificationEntity:
:
getMessageType
,
NotificationTypeEnum
.
COMMENT
.
getType
()));
NotificationEntity
last
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>().
eq
(
NotificationEntity:
:
getNotifiedUserId
,
notifyUserId
)
NotificationEntity
last
=
notificationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
NotificationEntity
>().
eq
(
NotificationEntity:
:
getNotifiedUserId
,
notifyUserId
)
.
orderByDesc
(
NotificationEntity:
:
getUpdateTime
)
.
orderByDesc
(
NotificationEntity:
:
getUpdateTime
)
...
...
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