|
|
@ -2,10 +2,10 @@ package com.community.pocket.repository.android; |
|
|
|
|
|
|
|
|
|
|
|
import com.community.pocket.entity.po.Forum; |
|
|
|
import com.community.pocket.entity.po.Forum; |
|
|
|
import com.community.pocket.entity.po.ForumContent; |
|
|
|
import com.community.pocket.entity.po.ForumContent; |
|
|
|
|
|
|
|
import com.community.pocket.entity.vo.ForumQuery; |
|
|
|
import com.community.pocket.entity.vo.android.ForumContentVo; |
|
|
|
import com.community.pocket.entity.vo.android.ForumContentVo; |
|
|
|
import com.community.pocket.entity.vo.android.ForumReplyForm; |
|
|
|
import com.community.pocket.entity.vo.android.ForumReplyForm; |
|
|
|
import com.community.pocket.entity.vo.android.ForumVo; |
|
|
|
import com.community.pocket.entity.vo.android.ForumVo; |
|
|
|
import com.community.pocket.entity.vo.android.QueryForum; |
|
|
|
|
|
|
|
import com.community.pocket.repository.BaseDao; |
|
|
|
import com.community.pocket.repository.BaseDao; |
|
|
|
import com.community.pocket.util.LookupOperationUtil; |
|
|
|
import com.community.pocket.util.LookupOperationUtil; |
|
|
|
import com.community.pocket.util.TableName; |
|
|
|
import com.community.pocket.util.TableName; |
|
|
@ -30,7 +30,7 @@ public class ForumContentDao extends BaseDao<ForumContent> { |
|
|
|
private ForumDao forumDao; |
|
|
|
private ForumDao forumDao; |
|
|
|
|
|
|
|
|
|
|
|
//查找帖子详情
|
|
|
|
//查找帖子详情
|
|
|
|
public List<ForumContentVo> find(QueryForum queryForum) { |
|
|
|
public List<ForumContentVo> find(ForumQuery queryForum) { |
|
|
|
Aggregation aggregation = Aggregation.newAggregation(LookupOperationUtil.infoLookup, Aggregation.match(Criteria.where("forumId").is(queryForum.getForumId()))); |
|
|
|
Aggregation aggregation = Aggregation.newAggregation(LookupOperationUtil.infoLookup, Aggregation.match(Criteria.where("forumId").is(queryForum.getForumId()))); |
|
|
|
return mongoTemplate.aggregate(aggregation, TableName.forumContent, ForumContentVo.class).getMappedResults(); |
|
|
|
return mongoTemplate.aggregate(aggregation, TableName.forumContent, ForumContentVo.class).getMappedResults(); |
|
|
|
} |
|
|
|
} |
|
|
|