Compare commits

..

No commits in common. "e19f77a6d050b9c54caa8819f1939b77a44052d9" and "e1aa7302a938e4ffb6c181ecdb5adf7824ad4fff" have entirely different histories.

3 changed files with 8 additions and 16 deletions

View File

@ -2,11 +2,13 @@ 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;
@ -74,7 +76,7 @@ public class SysUserAttentionController {
*/
@ApiOperation(value = "查询关注列表")
@PostMapping("/selectAttention")
public R<PageInfo<SysUser>> selectAttention(@RequestBody PageVo pageVo){
public R<PageInfo<SysUser>> selectAttention(PageVo pageVo){
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectAttentionPage(pageVo);
@ -88,7 +90,7 @@ public class SysUserAttentionController {
*/
@ApiOperation(value = "查询粉丝列表")
@PostMapping("/selectToAttention")
public R<PageInfo<SysUser>> selectToAttention(@RequestBody PageVo pageVo){
public R<PageInfo<SysUser>> selectToAttention(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 Long type;
private Integer type;
}

View File

@ -7,6 +7,7 @@ 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;
@ -140,13 +141,8 @@ 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(pageVo.getType());
List<SysUser> sysUserList = sysUserMapper.selectUserPage(SecurityUtils.getUserId());
return new PageInfo<SysUser>(sysUserList);
@ -158,14 +154,8 @@ 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(pageVo.getType());
List<SysUser> sysUserList = sysUserMapper.selectToUserPage(SecurityUtils.getUserId());
return new PageInfo<SysUser>(sysUserList);