Compare commits
2 Commits
e1aa7302a9
...
e19f77a6d0
Author | SHA1 | Date |
---|---|---|
|
e19f77a6d0 | |
|
b30a70cbae |
|
@ -2,13 +2,11 @@ package com.mcwl.web.controller.resource;
|
||||||
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mcwl.common.annotation.RepeatSubmit;
|
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.R;
|
||||||
import com.mcwl.common.core.domain.entity.SysUser;
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
import com.mcwl.resource.domain.SysUserInfo;
|
import com.mcwl.resource.domain.SysUserInfo;
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
import com.mcwl.resource.domain.vo.PageVo;
|
||||||
import com.mcwl.resource.service.SysUserAttentionService;
|
import com.mcwl.resource.service.SysUserAttentionService;
|
||||||
import com.mcwl.resource.service.impl.SysUserAttentionServiceImpl;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -76,7 +74,7 @@ public class SysUserAttentionController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询关注列表")
|
@ApiOperation(value = "查询关注列表")
|
||||||
@PostMapping("/selectAttention")
|
@PostMapping("/selectAttention")
|
||||||
public R<PageInfo<SysUser>> selectAttention(PageVo pageVo){
|
public R<PageInfo<SysUser>> selectAttention(@RequestBody PageVo pageVo){
|
||||||
|
|
||||||
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectAttentionPage(pageVo);
|
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectAttentionPage(pageVo);
|
||||||
|
|
||||||
|
@ -90,7 +88,7 @@ public class SysUserAttentionController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询粉丝列表")
|
@ApiOperation(value = "查询粉丝列表")
|
||||||
@PostMapping("/selectToAttention")
|
@PostMapping("/selectToAttention")
|
||||||
public R<PageInfo<SysUser>> selectToAttention(PageVo pageVo){
|
public R<PageInfo<SysUser>> selectToAttention(@RequestBody PageVo pageVo){
|
||||||
|
|
||||||
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectToAttentionPage(pageVo);
|
PageInfo<SysUser> sysUserList = sysUserAttentionService.selectToAttentionPage(pageVo);
|
||||||
|
|
||||||
|
|
|
@ -31,5 +31,5 @@ public class PageVo {
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private Integer order;
|
private Integer order;
|
||||||
@ApiModelProperty(value = "条件过滤")
|
@ApiModelProperty(value = "条件过滤")
|
||||||
private Integer type;
|
private Long type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.core.domain.entity.SysUser;
|
import com.mcwl.common.core.domain.entity.SysUser;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.resource.domain.ModelLike;
|
|
||||||
import com.mcwl.resource.domain.SysAdvice;
|
import com.mcwl.resource.domain.SysAdvice;
|
||||||
import com.mcwl.resource.domain.SysUserAttention;
|
import com.mcwl.resource.domain.SysUserAttention;
|
||||||
import com.mcwl.resource.domain.SysUserInfo;
|
import com.mcwl.resource.domain.SysUserInfo;
|
||||||
|
@ -141,8 +140,13 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
||||||
PageHelper pageHelper = new PageHelper();
|
PageHelper pageHelper = new PageHelper();
|
||||||
pageHelper.startPage(pageVo.getPageNumber(),pageVo.getPageSize());
|
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);
|
return new PageInfo<SysUser>(sysUserList);
|
||||||
|
@ -154,8 +158,14 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
||||||
PageHelper pageHelper = new PageHelper();
|
PageHelper pageHelper = new PageHelper();
|
||||||
pageHelper.startPage(pageVo.getPageNumber(),pageVo.getPageSize());
|
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);
|
return new PageInfo<SysUser>(sysUserList);
|
||||||
|
|
Loading…
Reference in New Issue