Commit d7281c19 authored by 罗林杰's avatar 罗林杰

修改关注

parent 14d2571e
......@@ -121,7 +121,7 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
/**
* 查询关注的id集合
*/
List<Integer> queryFollowIdById(String authenBusinessId);
List<Integer> queryFollowIdById(@Param("userId") String authenBusinessId);
/**
* 排行榜
......
......@@ -164,12 +164,16 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
public IPage<OpmArticle> findAllByPagination(CyPageInfo<OpmArticle> paginationUtility,
OpmArticle opmArticle){
IPage<OpmArticle> result = null;
if (opmArticle.getArticleType().equals("0")){
if (opmArticle.getArticleType() != null && opmArticle.getArticleType().equals("0")){
//关注
//查询该用户关注对象的id集合
List<Integer> list = memInfoRepository.queryFollowIdById(CyUserUtil.getAuthenBusinessId());
opmArticle.setFollowList(list);
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
if (list.isEmpty()){
result = paginationUtility;
} else {
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
}
} else {
if (StringUtils.isNotEmpty(opmArticle.getUserId())){
//设置查询用户 查询某个人的动态列表
......
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