Commit 15e1d8fb authored by liwei's avatar liwei

修改了会员列表查询

parent 0fc32003
...@@ -58,7 +58,7 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle> ...@@ -58,7 +58,7 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle>
@Operation(summary="分页查询动态列表集合", description="分页查询动态列表集合") @Operation(summary="分页查询动态列表集合", description="分页查询动态列表集合")
@GetMapping(value = "/open/opmArticle/queryArticleByPagination") @GetMapping(value = "/open/opmArticle/queryArticleByPagination")
public CyGridModel listByPagination(OpmArticle opmArticle) { public CyGridModel listByPagination(OpmArticle opmArticle) {
opmArticleServiceImpl.findAllByPagination(getPaginationUtility(), opmArticle); opmArticleServiceImpl.findAllByPagination(getPaginationUtility(), opmArticle,"app");
return getGridModelResponse(); return getGridModelResponse();
} }
......
...@@ -122,7 +122,7 @@ public class OpmArticleController extends CyPaginationController<OpmArticle> { ...@@ -122,7 +122,7 @@ public class OpmArticleController extends CyPaginationController<OpmArticle> {
@Operation(summary="分页查询opmArticle管理集合", description="分页查询opmArticle管理集合") @Operation(summary="分页查询opmArticle管理集合", description="分页查询opmArticle管理集合")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public CyGridModel listByPagination(OpmArticle opmArticle) { public CyGridModel listByPagination(OpmArticle opmArticle) {
opmArticleServiceImpl.findAllByPagination(getPaginationUtility(), opmArticle); opmArticleServiceImpl.findAllByPagination(getPaginationUtility(), opmArticle,"web");
return getGridModelResponse(); return getGridModelResponse();
} }
......
...@@ -56,7 +56,7 @@ public interface OpmArticleService { ...@@ -56,7 +56,7 @@ public interface OpmArticleService {
* @return * @return
*/ */
IPage<OpmArticle> findAllByPagination(CyPageInfo<OpmArticle> paginationUtility, IPage<OpmArticle> findAllByPagination(CyPageInfo<OpmArticle> paginationUtility,
OpmArticle opmArticle); OpmArticle opmArticle,String type);
/** /**
......
...@@ -175,16 +175,26 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -175,16 +175,26 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
*/ */
@Override @Override
public IPage<OpmArticle> findAllByPagination(CyPageInfo<OpmArticle> paginationUtility, public IPage<OpmArticle> findAllByPagination(CyPageInfo<OpmArticle> paginationUtility,
OpmArticle opmArticle){ OpmArticle opmArticle,String type){
IPage<OpmArticle> result = null; IPage<OpmArticle> result = null;
if (opmArticle.getArticleType() != null && opmArticle.getArticleType().equals("0")){ if (type.equals("app")){
//关注 //小程序
//查询该用户关注对象的id集合 if (opmArticle.getArticleType() != null && opmArticle.getArticleType().equals("0")){
List<Integer> list = memInfoRepository.queryFollowIdById(CyUserUtil.getAuthenBusinessId()); //关注
opmArticle.setFollowList(list); //查询该用户关注对象的id集合
if (list.isEmpty()){ List<Integer> list = memInfoRepository.queryFollowIdById(CyUserUtil.getAuthenBusinessId());
result = paginationUtility; opmArticle.setFollowList(list);
if (list.isEmpty()){
result = paginationUtility;
} else {
if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){
//设置当前登录人id 用来查询该用户对文章是否已点赞
opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId());
}
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
}
} else { } else {
//话题 最近
if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){ if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){
//设置当前登录人id 用来查询该用户对文章是否已点赞 //设置当前登录人id 用来查询该用户对文章是否已点赞
opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId()); opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId());
...@@ -192,11 +202,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -192,11 +202,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle); result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
} }
} else { } else {
//话题 最近 //管理端
if (StringUtils.isNotEmpty(CyUserUtil.getAuthenBusinessId())){
//设置当前登录人id 用来查询该用户对文章是否已点赞
opmArticle.setLoginUserId(CyUserUtil.getAuthenBusinessId());
}
result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle); result = baseMapper.queryOpmArticlePaged(paginationUtility,opmArticle);
} }
return result; return result;
......
...@@ -410,6 +410,11 @@ ...@@ -410,6 +410,11 @@
</if> </if>
<if test="entity.loginUserId !=null and entity.loginUserId != '' "> <if test="entity.loginUserId !=null and entity.loginUserId != '' ">
and m.user_id != #{entity.loginUserId} and m.user_id != #{entity.loginUserId}
and m.user_id not in (
select obl.target_id
from opm_black_list obl
where obl.user_id = #{entity.loginUserId}
)
</if> </if>
ORDER BY m.mem_level desc,m.mem_real_authen desc,m.is_recommended desc,m.sort,m.mem_code desc,m.business_id DESC ORDER BY m.mem_level desc,m.mem_real_authen desc,m.is_recommended desc,m.sort,m.mem_code desc,m.business_id DESC
</select> </select>
......
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