Compare commits

...

2 Commits

Author SHA1 Message Date
Diyu0904 e19f77a6d0 Merge remote-tracking branch 'origin/preview' into preview 2025-02-21 18:02:00 +08:00
yang b30a70cbae 联调粉丝,关注列表 2025-02-21 18:01:43 +08:00
3 changed files with 16 additions and 8 deletions

View File

@ -2,13 +2,11 @@ package com.mcwl.web.controller.resource;
import com.github.pagehelper.PageInfo;
import com.mcwl.common.annotation.RepeatSubmit;
import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.domain.entity.SysUser;
import com.mcwl.resource.domain.SysUserInfo;
import com.mcwl.resource.domain.vo.PageVo;
import com.mcwl.resource.service.SysUserAttentionService;
import com.mcwl.resource.service.impl.SysUserAttentionServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -76,7 +74,7 @@ public class SysUserAttentionController {
*/
@ApiOperation(value = "查询关注列表")
@PostMapping("/selectAttention")
public R<PageInfo<SysUser>> selectAttention(PageVo pageVo){
public R<PageInfo<SysUser>> selectAttention(@RequestBody PageVo pageVo){
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectAttentionPage(pageVo);
@ -90,7 +88,7 @@ public class SysUserAttentionController {
*/
@ApiOperation(value = "查询粉丝列表")
@PostMapping("/selectToAttention")
public R<PageInfo<SysUser>> selectToAttention(PageVo pageVo){
public R<PageInfo<SysUser>> selectToAttention(@RequestBody PageVo pageVo){
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectToAttentionPage(pageVo);

View File

@ -31,5 +31,5 @@ public class PageVo {
@ApiModelProperty(value = "排序")
private Integer order;
@ApiModelProperty(value = "条件过滤")
private Integer type;
private Long type;
}

View File

@ -7,7 +7,6 @@ import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.domain.entity.SysUser;
import com.mcwl.common.utils.SecurityUtils;
import com.mcwl.common.utils.StringUtils;
import com.mcwl.resource.domain.ModelLike;
import com.mcwl.resource.domain.SysAdvice;
import com.mcwl.resource.domain.SysUserAttention;
import com.mcwl.resource.domain.SysUserInfo;
@ -141,8 +140,13 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
PageHelper pageHelper = new PageHelper();
pageHelper.startPage(pageVo.getPageNumber(),pageVo.getPageSize());
if (pageVo.getType() == null){
pageVo.setType(SecurityUtils.getUserIdMax());
}
//条件构造器
List<SysUser> sysUserList = sysUserMapper.selectUserPage(SecurityUtils.getUserId());
List<SysUser> sysUserList = sysUserMapper.selectUserPage(pageVo.getType());
return new PageInfo<SysUser>(sysUserList);
@ -154,8 +158,14 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
PageHelper pageHelper = new PageHelper();
pageHelper.startPage(pageVo.getPageNumber(),pageVo.getPageSize());
if (pageVo.getType() == null){
pageVo.setType(SecurityUtils.getUserIdMax());
}
//条件构造器
List<SysUser> sysUserList = sysUserMapper.selectToUserPage(SecurityUtils.getUserId());
List<SysUser> sysUserList = sysUserMapper.selectToUserPage(pageVo.getType());
return new PageInfo<SysUser>(sysUserList);