userexamine

master
20918 12 months ago
parent caae27e225
commit 3e6d517aa4

@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
@ -99,8 +100,8 @@ public class SysUserExamineController extends BaseController {
{
List<SysRole> roles = roleService.selectRolesByUserId(userId);
mmap.put("user",userService.selectUserById(userId));
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostsByUserId(userId));
mmap.put("roles", roleService.selectRolesByUserIds(userId));
mmap.put("posts", postService.selectPostsByUserIds(userId));
return prefix + "/examineprint";
}
}

@ -33,6 +33,8 @@ public interface ISysPostService
*/
public List<SysPost> selectPostsByUserId(Long userId);
List<SysPost> selectPostsByUserIds(Long userId);
/**
* ID
*

@ -36,6 +36,8 @@ public interface ISysRoleService
*/
public List<SysRole> selectRolesByUserId(Long userId);
List<SysRole> selectRolesByUserIds(Long userId);
/**
*
*

@ -74,6 +74,20 @@ public class SysPostServiceImpl implements ISysPostService
return posts;
}
/**
* ID
*
* @param userId ID
* @return
*/
@Override
public List<SysPost> selectPostsByUserIds(Long userId)
{
List<SysPost> userPosts = postMapper.selectPostsByUserId(userId);
return userPosts;
}
/**
* ID
*

@ -105,6 +105,19 @@ public class SysRoleServiceImpl implements ISysRoleService
return roles;
}
/**
* ID
*
* @param userId ID
* @return
*/
@Override
public List<SysRole> selectRolesByUserIds(Long userId)
{
List<SysRole> userRoles = roleMapper.selectRolesByUserId(userId);
return userRoles;
}
/**
*
*

Loading…
Cancel
Save