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
0f31bc4b
Commit
0f31bc4b
authored
Aug 16, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知添加话题信息
parent
7f1321ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
ThemeNotifyQo.java
.../java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
+4
-0
NotificationManager.java
...java/com/tanpu/community/manager/NotificationManager.java
+5
-3
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+7
-0
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
View file @
0f31bc4b
...
@@ -56,6 +56,10 @@ public class ThemeNotifyQo {
...
@@ -56,6 +56,10 @@ public class ThemeNotifyQo {
public
String
formerContent
;
public
String
formerContent
;
@ApiModelProperty
(
value
=
"引用的主题用户昵称"
)
@ApiModelProperty
(
value
=
"引用的主题用户昵称"
)
public
String
formerUserName
;
public
String
formerUserName
;
@ApiModelProperty
(
value
=
"引用的主题的话题id"
)
public
String
formerTopicId
;
@ApiModelProperty
(
value
=
"引用的主题的话题名称"
)
public
String
formerTopicTitle
;
// 点赞聚合
// 点赞聚合
@ApiModelProperty
(
value
=
"用户id"
)
@ApiModelProperty
(
value
=
"用户id"
)
...
...
community-service/src/main/java/com/tanpu/community/manager/NotificationManager.java
View file @
0f31bc4b
...
@@ -22,7 +22,6 @@ import com.tanpu.community.dao.entity.community.CommentEntity;
...
@@ -22,7 +22,6 @@ import com.tanpu.community.dao.entity.community.CommentEntity;
import
com.tanpu.community.dao.entity.community.FollowRelEntity
;
import
com.tanpu.community.dao.entity.community.FollowRelEntity
;
import
com.tanpu.community.dao.entity.community.NotificationEntity
;
import
com.tanpu.community.dao.entity.community.NotificationEntity
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.entity.community.TopicEntity
;
import
com.tanpu.community.feign.fatools.FeignClientForFatools
;
import
com.tanpu.community.feign.fatools.FeignClientForFatools
;
import
com.tanpu.community.service.BatchFeignCallService
;
import
com.tanpu.community.service.BatchFeignCallService
;
import
com.tanpu.community.service.CollectionService
;
import
com.tanpu.community.service.CollectionService
;
...
@@ -98,6 +97,10 @@ public class NotificationManager {
...
@@ -98,6 +97,10 @@ public class NotificationManager {
ThemeEntity
former
=
themeService
.
queryByThemeId
(
themeNotifyQo
.
getFormerThemeId
());
ThemeEntity
former
=
themeService
.
queryByThemeId
(
themeNotifyQo
.
getFormerThemeId
());
if
(
former
!=
null
)
{
if
(
former
!=
null
)
{
themeNotifyQo
.
setFormerUserName
(
currentUser
.
getNickName
());
themeNotifyQo
.
setFormerUserName
(
currentUser
.
getNickName
());
if
(
StringUtils
.
isNotBlank
(
former
.
getTopicId
())){
themeNotifyQo
.
setFormerTopicId
(
former
.
getTopicId
());
themeNotifyQo
.
setFormerTopicTitle
(
topicService
.
queryTitleById
(
former
.
getTopicId
()));
}
if
(
ThemeTypeEnum
.
DISCUSSION
.
getCode
().
equals
(
former
.
getThemeType
())
||
ThemeTypeEnum
.
FORWARD
.
getCode
().
equals
(
former
.
getThemeType
()))
{
if
(
ThemeTypeEnum
.
DISCUSSION
.
getCode
().
equals
(
former
.
getThemeType
())
||
ThemeTypeEnum
.
FORWARD
.
getCode
().
equals
(
former
.
getThemeType
()))
{
List
<
ThemeContentQo
>
themeContentQos
=
JsonUtil
.
toBean
(
former
.
getContent
(),
new
TypeReference
<
List
<
ThemeContentQo
>>()
{
List
<
ThemeContentQo
>
themeContentQos
=
JsonUtil
.
toBean
(
former
.
getContent
(),
new
TypeReference
<
List
<
ThemeContentQo
>>()
{
});
});
...
@@ -110,8 +113,7 @@ public class NotificationManager {
...
@@ -110,8 +113,7 @@ public class NotificationManager {
}
}
// 话题
// 话题
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
if
(
StringUtils
.
isNotBlank
(
themeNotifyQo
.
getTopicId
()))
{
TopicEntity
topicEntity
=
topicService
.
queryById
(
themeNotifyQo
.
getTopicId
());
themeNotifyQo
.
setFormerTopicTitle
(
topicService
.
queryTitleById
(
themeNotifyQo
.
getTopicId
()));
themeNotifyQo
.
setTopicTitle
(
topicEntity
.
getTopicTitle
());
}
}
// 点赞聚合
// 点赞聚合
if
(
themeNotifyQo
.
getLikeUserCount
()!=
null
&&
themeNotifyQo
.
getLikeUserCount
()>
1
)
{
if
(
themeNotifyQo
.
getLikeUserCount
()!=
null
&&
themeNotifyQo
.
getLikeUserCount
()>
1
)
{
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
0f31bc4b
...
@@ -81,6 +81,13 @@ public class TopicService {
...
@@ -81,6 +81,13 @@ public class TopicService {
.
eq
(
TopicEntity:
:
getDeleteTag
,
StatusEnum
.
FALSE
));
.
eq
(
TopicEntity:
:
getDeleteTag
,
StatusEnum
.
FALSE
));
}
}
public
String
queryTitleById
(
String
topicId
)
{
return
topicMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TopicEntity
>()
.
eq
(
TopicEntity:
:
getTopicId
,
topicId
)
.
eq
(
TopicEntity:
:
getIsConceal
,
StatusEnum
.
FALSE
)
.
eq
(
TopicEntity:
:
getDeleteTag
,
StatusEnum
.
FALSE
)).
getTopicTitle
();
}
public
List
<
TopicEntity
>
queryByIds
(
List
<
String
>
topicIds
)
{
public
List
<
TopicEntity
>
queryByIds
(
List
<
String
>
topicIds
)
{
if
(
CollectionUtils
.
isEmpty
(
topicIds
))
{
if
(
CollectionUtils
.
isEmpty
(
topicIds
))
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
...
...
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