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
2f2140ba
Commit
2f2140ba
authored
Feb 23, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论的评论
parent
b79edc8a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
ThemeNotifyQo.java
.../java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
+2
-0
CommentManager.java
...main/java/com/tanpu/community/manager/CommentManager.java
+3
-3
NotificationManager.java
...java/com/tanpu/community/manager/NotificationManager.java
+9
-1
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
View file @
2f2140ba
...
...
@@ -51,6 +51,8 @@ public class ThemeNotifyQo {
private
String
content
;
@ApiModelProperty
(
value
=
"评论Id"
)
private
String
commentId
;
@ApiModelProperty
(
value
=
"回复的评论Id"
)
private
String
replyCommentId
;
@ApiModelProperty
(
value
=
"转发类型-主题id"
)
private
String
forwardThemeId
;
...
...
community-service/src/main/java/com/tanpu/community/manager/CommentManager.java
View file @
2f2140ba
...
...
@@ -105,9 +105,9 @@ public class CommentManager {
notificationService
.
putNotifyCache
(
themeEntity
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
COMMENT
);
// 回复提醒
if
(
StringUtils
.
isNotBlank
(
req
.
getReplyId
())){
notificationService
.
insert
(
userId
,
themeEntity
.
getAuthorId
(),
NotificationTypeEnum
.
COMMENT_REPLY
,
commentEntity
.
getReply
Id
(),
req
.
getComment
());
notificationService
.
putNotifyCache
(
themeEntity
.
getAutho
rId
(),
userId
,
NotificationTypeEnum
.
COMMENT_REPLY
);
if
(
StringUtils
.
isNotBlank
(
req
.
getReply
User
Id
())){
notificationService
.
insert
(
userId
,
req
.
getReplyUserId
(),
NotificationTypeEnum
.
COMMENT_REPLY
,
commentEntity
.
getComment
Id
(),
req
.
getComment
());
notificationService
.
putNotifyCache
(
req
.
getReplyUse
rId
(),
userId
,
NotificationTypeEnum
.
COMMENT_REPLY
);
}
...
...
community-service/src/main/java/com/tanpu/community/manager/NotificationManager.java
View file @
2f2140ba
...
...
@@ -102,10 +102,10 @@ public class NotificationManager {
CommentEntity
commentEntity
=
commentService
.
queryByCommentId
(
themeNotifyQo
.
getCommentId
());
if
(
commentEntity
!=
null
)
{
themeNotifyQo
.
setFormerThemeId
(
commentEntity
.
getThemeId
());
themeNotifyQo
.
setReplyCommentId
(
commentEntity
.
getReplyId
());
if
(
NotificationTypeEnum
.
COMMENT_LIKE
.
getCode
().
equals
(
themeNotifyQo
.
getMessageType
()))
{
themeNotifyQo
.
setContent
(
commentEntity
.
getContent
());
}
}
}
...
...
@@ -136,6 +136,14 @@ public class NotificationManager {
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
themeNotifyQo
.
setTopicTitle
(
topicService
.
queryTitleById
(
themeNotifyQo
.
getTopicId
()));
}
// 评论的评论
if
(
NotificationTypeEnum
.
COMMENT
.
getCode
().
equals
(
themeNotifyQo
.
getMessageType
())){
CommentEntity
commentEntity
=
commentService
.
queryByCommentId
(
themeNotifyQo
.
getReplyCommentId
());
if
(
commentEntity
!=
null
)
{
themeNotifyQo
.
setFormerContent
(
commentEntity
.
getContent
());
}
}
// 点赞聚合
if
(
themeNotifyQo
.
getLikeUserCount
()
!=
null
&&
themeNotifyQo
.
getLikeUserCount
()
>
1
)
{
List
<
UserBriefInfoQO
>
likeUsers
=
themeNotifyQo
.
getLikeUsers
();
...
...
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