|
|
|
@ -5,7 +5,10 @@ import com.community.pocket.entity.po.android.Complain; |
|
|
|
|
import com.community.pocket.entity.po.android.MyInfo; |
|
|
|
|
import com.community.pocket.entity.vo.ForumQuery; |
|
|
|
|
import com.community.pocket.entity.vo.Page; |
|
|
|
|
import com.community.pocket.entity.vo.android.*; |
|
|
|
|
import com.community.pocket.entity.vo.android.ForumDto; |
|
|
|
|
import com.community.pocket.entity.vo.android.ForumHot; |
|
|
|
|
import com.community.pocket.entity.vo.android.ForumReplyForm; |
|
|
|
|
import com.community.pocket.entity.vo.android.ForumVo; |
|
|
|
|
import com.community.pocket.entity.vo.web.ForumCheck; |
|
|
|
|
import com.community.pocket.repository.BaseDao; |
|
|
|
|
import com.community.pocket.util.LookupOperationUtil; |
|
|
|
@ -79,8 +82,8 @@ public class ForumDao extends BaseDao<Forum> { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询帖子
|
|
|
|
|
public ForumDto loadForum(QueryForum queryForum) { |
|
|
|
|
Aggregation aggregation = Aggregation.newAggregation(Aggregation.match(Criteria.where(LookupOperationUtil.idKey).is(queryForum.getForumId())), LookupOperationUtil.complainforumLookup, LookupOperationUtil.activeforumLookup, LookupOperationUtil.infoLookup); |
|
|
|
|
public ForumDto loadForumWithId(ForumQuery queryForum) { |
|
|
|
|
Aggregation aggregation = Aggregation.newAggregation(Aggregation.match(Criteria.where(LookupOperationUtil.idKey).is(queryForum.getForumId())), LookupOperationUtil.complainforumLookup, LookupOperationUtil.activeforumLookup, LookupOperationUtil.scoreforumLookup, LookupOperationUtil.infoLookup); |
|
|
|
|
return mongoTemplate.aggregate(aggregation, TableName.forum, ForumDto.class).getUniqueMappedResult(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|