|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.ruoyi.web.controller.system.count;
|
|
|
|
package com.ruoyi.web.controller.system.count;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@ -112,7 +113,7 @@ public class SysUsernumController extends BaseController {
|
|
|
|
List<SysUserPost> postList = sysUserPostService.lambdaQuery().
|
|
|
|
List<SysUserPost> postList = sysUserPostService.lambdaQuery().
|
|
|
|
eq(SysUserPost::getUserId, sysuser.getUserId()).list();
|
|
|
|
eq(SysUserPost::getUserId, sysuser.getUserId()).list();
|
|
|
|
List<Long> postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList());
|
|
|
|
List<Long> postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList());
|
|
|
|
if(CollectionUtil.isNotEmpty(postIds)){
|
|
|
|
if(CollUtil.isNotEmpty(postIds)){
|
|
|
|
List<SysPost> sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list();
|
|
|
|
List<SysPost> sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list();
|
|
|
|
sysuser.setPosts( Convert.toList(SysPostVO.class, sysPostList));
|
|
|
|
sysuser.setPosts( Convert.toList(SysPostVO.class, sysPostList));
|
|
|
|
}
|
|
|
|
}
|
|
|
|