Skip to content

Commit

Permalink
🎨 查询用户回帖列表过滤掉被屏蔽的回帖
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 25, 2018
1 parent 9869b3d commit 5ba3854
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* Comment management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.12.2.5, Dec 16, 2018
* @version 2.12.2.6, Dec 25, 2018
* @since 0.2.0
*/
@Service
Expand Down Expand Up @@ -507,8 +507,8 @@ public List<JSONObject> getUserComments(final int avatarViewMode, final String u
.setCurrentPageNum(currentPageNum).setPageSize(pageSize).
setFilter(CompositeFilterOperator.and(
new PropertyFilter(Comment.COMMENT_AUTHOR_ID, FilterOperator.EQUAL, userId),
new PropertyFilter(Comment.COMMENT_ANONYMOUS, FilterOperator.EQUAL, anonymous)
));
new PropertyFilter(Comment.COMMENT_ANONYMOUS, FilterOperator.EQUAL, anonymous),
new PropertyFilter(Comment.COMMENT_STATUS, FilterOperator.EQUAL, Comment.COMMENT_STATUS_C_VALID)));
try {
final JSONObject result = commentRepository.get(query);
final List<JSONObject> ret = CollectionUtils.jsonArrayToList(result.optJSONArray(Keys.RESULTS));
Expand Down

0 comments on commit 5ba3854

Please sign in to comment.