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
fe188a5f
Commit
fe188a5f
authored
Feb 23, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.3.1' into 'dev'
评论的评论 See merge request
!71
parents
2044a293
2f2140ba
Hide 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 @
fe188a5f
...
@@ -51,6 +51,8 @@ public class ThemeNotifyQo {
...
@@ -51,6 +51,8 @@ public class ThemeNotifyQo {
private
String
content
;
private
String
content
;
@ApiModelProperty
(
value
=
"评论Id"
)
@ApiModelProperty
(
value
=
"评论Id"
)
private
String
commentId
;
private
String
commentId
;
@ApiModelProperty
(
value
=
"回复的评论Id"
)
private
String
replyCommentId
;
@ApiModelProperty
(
value
=
"转发类型-主题id"
)
@ApiModelProperty
(
value
=
"转发类型-主题id"
)
private
String
forwardThemeId
;
private
String
forwardThemeId
;
...
...
community-service/src/main/java/com/tanpu/community/manager/CommentManager.java
View file @
fe188a5f
...
@@ -105,9 +105,9 @@ public class CommentManager {
...
@@ -105,9 +105,9 @@ public class CommentManager {
notificationService
.
putNotifyCache
(
themeEntity
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
COMMENT
);
notificationService
.
putNotifyCache
(
themeEntity
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
COMMENT
);
// 回复提醒
// 回复提醒
if
(
StringUtils
.
isNotBlank
(
req
.
getReplyId
())){
if
(
StringUtils
.
isNotBlank
(
req
.
getReply
User
Id
())){
notificationService
.
insert
(
userId
,
themeEntity
.
getAuthorId
(),
NotificationTypeEnum
.
COMMENT_REPLY
,
commentEntity
.
getReply
Id
(),
req
.
getComment
());
notificationService
.
insert
(
userId
,
req
.
getReplyUserId
(),
NotificationTypeEnum
.
COMMENT_REPLY
,
commentEntity
.
getComment
Id
(),
req
.
getComment
());
notificationService
.
putNotifyCache
(
themeEntity
.
getAutho
rId
(),
userId
,
NotificationTypeEnum
.
COMMENT_REPLY
);
notificationService
.
putNotifyCache
(
req
.
getReplyUse
rId
(),
userId
,
NotificationTypeEnum
.
COMMENT_REPLY
);
}
}
...
...
community-service/src/main/java/com/tanpu/community/manager/NotificationManager.java
View file @
fe188a5f
...
@@ -102,10 +102,10 @@ public class NotificationManager {
...
@@ -102,10 +102,10 @@ public class NotificationManager {
CommentEntity
commentEntity
=
commentService
.
queryByCommentId
(
themeNotifyQo
.
getCommentId
());
CommentEntity
commentEntity
=
commentService
.
queryByCommentId
(
themeNotifyQo
.
getCommentId
());
if
(
commentEntity
!=
null
)
{
if
(
commentEntity
!=
null
)
{
themeNotifyQo
.
setFormerThemeId
(
commentEntity
.
getThemeId
());
themeNotifyQo
.
setFormerThemeId
(
commentEntity
.
getThemeId
());
themeNotifyQo
.
setReplyCommentId
(
commentEntity
.
getReplyId
());
if
(
NotificationTypeEnum
.
COMMENT_LIKE
.
getCode
().
equals
(
themeNotifyQo
.
getMessageType
()))
{
if
(
NotificationTypeEnum
.
COMMENT_LIKE
.
getCode
().
equals
(
themeNotifyQo
.
getMessageType
()))
{
themeNotifyQo
.
setContent
(
commentEntity
.
getContent
());
themeNotifyQo
.
setContent
(
commentEntity
.
getContent
());
}
}
}
}
}
}
...
@@ -136,6 +136,14 @@ public class NotificationManager {
...
@@ -136,6 +136,14 @@ public class NotificationManager {
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
themeNotifyQo
.
setTopicTitle
(
topicService
.
queryTitleById
(
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
)
{
if
(
themeNotifyQo
.
getLikeUserCount
()
!=
null
&&
themeNotifyQo
.
getLikeUserCount
()
>
1
)
{
List
<
UserBriefInfoQO
>
likeUsers
=
themeNotifyQo
.
getLikeUsers
();
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