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
37586eff
Commit
37586eff
authored
Aug 16, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知添加话题信息 fix
parent
0926f511
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
ThemeNotifyQo.java
.../java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
+2
-0
NotificationForwardDO.java
...com/tanpu/community/dao/entity/NotificationForwardDO.java
+2
-0
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+1
-1
NotificationService.java
...java/com/tanpu/community/service/NotificationService.java
+3
-3
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+1
-3
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeNotifyQo.java
View file @
37586eff
...
...
@@ -49,6 +49,8 @@ public class ThemeNotifyQo {
public
String
topicTitle
;
@ApiModelProperty
(
value
=
"评论/转发内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"转发类型-主题id"
)
private
String
forwardThemeId
;
@ApiModelProperty
(
value
=
"引用的主题id"
)
public
String
formerThemeId
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/NotificationForwardDO.java
View file @
37586eff
...
...
@@ -15,4 +15,6 @@ public class NotificationForwardDO {
private
String
topicId
;
private
String
themeId
;
}
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
37586eff
...
...
@@ -414,7 +414,7 @@ public class ThemeManager {
themeService
.
insertTheme
(
themeEntity
);
// 消息通知
ThemeEntity
formerTheme
=
themeService
.
queryByThemeId
(
req
.
getFormerThemeId
());
notificationService
.
insertForward
(
userId
,
formerTheme
.
getAuthorId
(),
formerTheme
.
getThemeId
(),
req
.
getTopicId
(),
req
.
getContent
().
get
(
0
).
getValue
());
notificationService
.
insertForward
(
userId
,
formerTheme
.
getAuthorId
(),
formerTheme
.
getThemeId
(),
req
.
getTopicId
(),
req
.
getContent
().
get
(
0
).
getValue
()
,
themeEntity
.
getThemeId
()
);
notificationService
.
putNotifyCache
(
formerTheme
.
getAuthorId
(),
userId
,
NotificationTypeEnum
.
FORWARD
);
}
else
{
...
...
community-service/src/main/java/com/tanpu/community/service/NotificationService.java
View file @
37586eff
...
...
@@ -70,15 +70,15 @@ public class NotificationService {
}
public
void
insertForward
(
String
operatorId
,
String
notifierId
,
String
themeId
,
String
topicId
,
String
text
){
NotificationForwardDO
forwardDO
=
NotificationForwardDO
.
builder
().
topicId
(
topicId
).
content
(
text
).
build
();
public
void
insertForward
(
String
operatorId
,
String
notifierId
,
String
forwardThemeId
,
String
topicId
,
String
text
,
String
themeId
){
NotificationForwardDO
forwardDO
=
NotificationForwardDO
.
builder
().
topicId
(
topicId
).
content
(
text
).
themeId
(
themeId
).
build
();
NotificationEntity
entity
=
NotificationEntity
.
builder
().
operatorId
(
operatorId
)
.
notificationId
(
uuidGenHelper
.
getUuidStr
())
.
notifiedUserId
(
notifierId
)
.
messageType
(
NotificationTypeEnum
.
FORWARD
.
getCode
())
.
content
(
JsonUtil
.
toJson
(
forwardDO
))
.
operatorId
(
operatorId
)
.
targetId
(
t
hemeId
)
.
targetId
(
forwardT
hemeId
)
.
build
();
insert
(
entity
);
...
...
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
37586eff
...
...
@@ -259,12 +259,10 @@ public class ConvertUtil {
NotificationForwardDO
forwardDO
=
JsonUtil
.
toBean
(
entity
.
getContent
(),
NotificationForwardDO
.
class
);
themeNotifyQo
.
setContent
(
forwardDO
.
getContent
());
themeNotifyQo
.
setTopicId
(
forwardDO
.
getTopicId
());
themeNotifyQo
.
setForwardThemeId
(
forwardDO
.
getThemeId
());
}
catch
(
Exception
e
){
throw
new
BizException
(
"消息通知-转发类型-反序列化异常:"
+
entity
.
getContent
());
}
}
}
// 点赞需要聚合头像和人数
...
...
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