Commit 15e1d8fb authored by liwei's avatar liwei

修改了会员列表查询

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