联调粉丝,关注列表

master
yang 2025-02-21 17:03:15 +08:00 committed by Diyu0904
parent 0e114c87c0
commit b30a70cbae
7 changed files with 22 additions and 11 deletions

View File

@ -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);

View File

@ -135,6 +135,9 @@ public class SecurityConfig {
"/file/**", "/file/**",
"/model/modelSquare", "/model/modelSquare",
"/model/selectModelById", "/model/selectModelById",
"/model/selectByUserIdModel",
"/model/selectByUserIdWorkFlow",
"/model/selectByUserIdImage",
"/model/finbyid", "/model/finbyid",
"/ModelVersion/finbyid", "/ModelVersion/finbyid",
"/ModelComment/getComment", "/ModelComment/getComment",

View File

@ -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;
} }

View File

@ -176,7 +176,7 @@ public class ModelImageServiceImpl extends ServiceImpl<ModelImageMapper, ModelIm
@Override @Override
public TableDataInfo listByPage(ModelImagePageRes imagePageRes) { public TableDataInfo listByPage(ModelImagePageRes imagePageRes) {
if (Objects.isNull(imagePageRes.getUserId())) { if (Objects.isNull(imagePageRes.getUserId())) {
imagePageRes.setUserId(SecurityUtils.getUserId()); imagePageRes.setUserId(SecurityUtils.getUserIdMax());
} }
Page<ModelImage> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize()); Page<ModelImage> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize());
if (StringUtils.isEmpty(imagePageRes.getOrderByColumn())) { if (StringUtils.isEmpty(imagePageRes.getOrderByColumn())) {

View File

@ -159,7 +159,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
public TableDataInfo listByPage(ModelImagePageRes imagePageRes) { public TableDataInfo listByPage(ModelImagePageRes imagePageRes) {
if (Objects.isNull(imagePageRes.getUserId())) { if (Objects.isNull(imagePageRes.getUserId())) {
imagePageRes.setUserId(SecurityUtils.getUserId()); imagePageRes.setUserId(SecurityUtils.getUserIdMax());
} }
Page<ModelProduct> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize()); Page<ModelProduct> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize());

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.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);

View File

@ -409,7 +409,7 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
public TableDataInfo listByPage(ModelImagePageRes imagePageRes) { public TableDataInfo listByPage(ModelImagePageRes imagePageRes) {
if (Objects.isNull(imagePageRes.getUserId())) { if (Objects.isNull(imagePageRes.getUserId())) {
imagePageRes.setUserId(SecurityUtils.getUserId()); imagePageRes.setUserId(SecurityUtils.getUserIdMax());
} }
Page<WorkFlow> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize()); Page<WorkFlow> page = new Page<>(imagePageRes.getPageNum(), imagePageRes.getPageSize());