Commit a6240279 authored by 刘基明's avatar 刘基明

转并评论 fix

parent a818e469
......@@ -410,8 +410,8 @@ public class ThemeManager {
themeService.insertTheme(themeEntity);
// 消息通知
ThemeEntity formerTheme = themeService.queryByThemeId(req.getFormerThemeId());
if (formerTheme!=null){
notificationService.insertForward(userId, formerTheme.getAuthorId(), themeEntity.getThemeId(), req.getTopicId(), req.getContent().get(0).getValue(), themeEntity.getThemeId());
if (formerTheme != null) {
notificationService.insertForward(userId, formerTheme.getAuthorId(), req.getFormerThemeId(), req.getTopicId(), req.getContent().get(0).getValue(), themeEntity.getThemeId());
notificationService.putNotifyCache(formerTheme.getAuthorId(), userId, NotificationTypeEnum.FORWARD);
}
......@@ -426,7 +426,7 @@ public class ThemeManager {
if (req.getSyncComment() == BizConstant.SyncCommentType.SYNC_COMMENT) {
String commentId = commentService.forwardSyncComment(req, userId);
ThemeEntity formerTheme = themeService.queryByThemeId(req.getFormerThemeId());
if (formerTheme!=null){
if (formerTheme != null) {
notificationService.insert(userId, formerTheme.getAuthorId(), NotificationTypeEnum.COMMENT, commentId, req.getContent().get(0).getValue());
notificationService.putNotifyCache(formerTheme.getAuthorId(), userId, NotificationTypeEnum.COMMENT);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment