| | |
| | | @Resource |
| | | private RoleMenuMapper roleMenuMapper; |
| | | @Resource |
| | | private ColumnMapper columnMapper; |
| | | @Resource |
| | | private ArticleMapper articleMapper; |
| | | @Resource |
| | | private MessageBoardMapper messageBoardMapper; |
| | | @Resource |
| | | private MenuMapper menuMapper; |
| | | |
| | | @Override |
| | |
| | | return Result.ok(adminUserInfoVo); |
| | | } |
| | | |
| | | @Override |
| | | public Result viewHomePage() { |
| | | Long companyId = LoginUserUtil.getCompanyId(); |
| | | AdminHomePageInfoVo adminHomePageInfoVo = new AdminHomePageInfoVo(); |
| | | |
| | | QueryWrapper<ColumnEntity> columnQueryWrapper = new QueryWrapper<>(); |
| | | columnQueryWrapper.eq("company_id",companyId); |
| | | adminHomePageInfoVo.setColumnNum(columnMapper.selectCount(columnQueryWrapper)); |
| | | |
| | | QueryWrapper<ArticleEntity> articleQueryWrapper = new QueryWrapper<>(); |
| | | articleQueryWrapper.eq("company_id",companyId); |
| | | adminHomePageInfoVo.setArticleNum(articleMapper.selectCount(articleQueryWrapper)); |
| | | |
| | | QueryWrapper<MessageBoardEntity> messageQueryWrapper = new QueryWrapper<>(); |
| | | messageQueryWrapper.eq("company_id",companyId); |
| | | adminHomePageInfoVo.setMessageNum(messageBoardMapper.selectCount(messageQueryWrapper)); |
| | | return Result.ok(adminHomePageInfoVo); |
| | | } |
| | | |
| | | private void saveUserRole(String roleIds,Long userId) { |
| | | if (StrUtil.isNotEmpty(roleIds)) { |
| | | String[] roleIdList = roleIds.split(StringPool.COMMA); |