Commit f1dead48 authored by Liang Ding's avatar Liang Ding

#12633

parent 78f0ff30
...@@ -201,7 +201,6 @@ public class PageMgmtService { ...@@ -201,7 +201,6 @@ public class PageMgmtService {
try { try {
LOGGER.log(Level.DEBUG, "Removing a page[id={0}]", pageId); LOGGER.log(Level.DEBUG, "Removing a page[id={0}]", pageId);
removePageComments(pageId);
pageRepository.remove(pageId); pageRepository.remove(pageId);
transaction.commit(); transaction.commit();
...@@ -355,23 +354,6 @@ public class PageMgmtService { ...@@ -355,23 +354,6 @@ public class PageMgmtService {
} }
} }
/**
* Removes page comments by the specified page id.
* <p>
* Removes related comments, sets page/blog comment statistic count.
* </p>
*
* @param pageId the specified page id
* @throws JSONException json exception
* @throws Exception exception
*/
private void removePageComments(final String pageId) throws Exception {
final int removedCnt = commentRepository.removeComments(pageId);
int publishedBlogCommentCount = statisticQueryService.getPublishedBlogCommentCount();
publishedBlogCommentCount -= removedCnt;
statisticMgmtService.setPublishedBlogCommentCount(publishedBlogCommentCount);
}
/** /**
* Processes comments for page update. * Processes comments for page update.
* *
......
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