}
if (user == null) {
return FrontUtils.showLogin(request, model, site);
}
// 删除单条评论
CmsComment bean;
if (commentId != null) {
bean = commentMng.deleteById(commentId);
log.info("delete CmsComment id={}", bean.getId());
} else {
// 依据评论人或者评论ip删除评论
List<CmsComment> comments = commentMng.getListForDel(site.getId(),
user.getId(), userId, ip);
for (int i = 0; i < comments.size(); i++) {
bean = comments.get(i);
commentMng.deleteById(comments.get(i).getId());
log.info("delete CmsComment id={}", bean.getId());
}
}
/*
* Pagination pagination = commentMng.getPageForMember(site.getId(),
* null, null, user.getId(), null, null, null, true, cpn(pageNo),