Fixed: The problem that the new comment notification message is empty.

pull/167/head
ruibaby 2019-05-23 00:28:58 +08:00
parent 527d8bf390
commit f78d6d4c3f
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ public class CommentEventListener {
Map<String, Object> data = new HashMap<>();
if (newEvent.getSource() instanceof PostService) {
if (newEvent.getSource() instanceof PostCommentService) {
// Get postComment id
PostComment postComment = postCommentService.getById(newEvent.getCommentId());
@ -85,7 +85,7 @@ public class CommentEventListener {
data.put("page", post.getTitle());
data.put("author", postComment.getAuthor());
data.put("content", postComment.getContent());
} else if (newEvent.getSource() instanceof SheetService) {
} else if (newEvent.getSource() instanceof SheetCommentService) {
SheetComment sheetComment = sheetCommentService.getById(newEvent.getCommentId());
log.debug("Got sheet comment: [{}]", sheetComment);
@ -99,7 +99,7 @@ public class CommentEventListener {
data.put("page", sheet.getTitle());
data.put("author", sheetComment.getAuthor());
data.put("content", sheetComment.getContent());
} else if (newEvent.getSource() instanceof JournalService) {
} else if (newEvent.getSource() instanceof JournalCommentService) {
JournalComment journalComment = journalCommentService.getById(newEvent.getCommentId());
log.debug("Got journal comment: [{}]", journalComment);

View File

@ -192,7 +192,7 @@ public class AdminServiceImpl implements AdminService {
Assert.hasText(refreshToken, "Refresh token must not be blank");
Integer userId = cacheStore.getAny(SecurityUtils.buildTokenRefreshKey(refreshToken), Integer.class)
.orElseThrow(() -> new BadRequestException("The refresh token may have been expired already").setErrorData(refreshToken));
.orElseThrow(() -> new BadRequestException("登陆状态已失效,请重新登陆").setErrorData(refreshToken));
// Get user info
User user = userService.getById(userId);