粉丝列表,关注列表新增是否关注
parent
f2c09097fe
commit
e39f863f6c
|
@ -18,6 +18,7 @@ import com.mcwl.system.mapper.SysUserMapper;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -138,6 +139,12 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
|||
pageHelper.startPage(pageVo.getPageNumber(), pageVo.getPageSize());
|
||||
|
||||
Long userIdMax = SecurityUtils.getUserIdMax();
|
||||
|
||||
if (userIdMax == 0L) {
|
||||
|
||||
return new PageInfo<SysUser>(new ArrayList<SysUser>());
|
||||
}
|
||||
|
||||
if (pageVo.getType() == null) {
|
||||
|
||||
pageVo.setType(userIdMax);
|
||||
|
@ -148,12 +155,11 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
|||
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
|
||||
if (userIdMax == 0L) {
|
||||
sysUser.setAttention(false);
|
||||
} else {
|
||||
if (sysUser != null){
|
||||
sysUser.setAttention(selectAttention(sysUser.getUserId()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return new PageInfo<SysUser>(sysUserList);
|
||||
|
@ -166,6 +172,12 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
|||
pageHelper.startPage(pageVo.getPageNumber(), pageVo.getPageSize());
|
||||
|
||||
Long userIdMax = SecurityUtils.getUserIdMax();
|
||||
|
||||
if (userIdMax == 0L) {
|
||||
|
||||
return new PageInfo<SysUser>(new ArrayList<SysUser>());
|
||||
}
|
||||
|
||||
if (pageVo.getType() == null) {
|
||||
|
||||
pageVo.setType(userIdMax);
|
||||
|
@ -177,12 +189,11 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
|||
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
|
||||
if (userIdMax == 0L) {
|
||||
sysUser.setAttention(false);
|
||||
} else {
|
||||
if (sysUser != null){
|
||||
sysUser.setAttention(selectAttention(sysUser.getUserId()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue