| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | public ManageRole getRoleByAccountId(Integer accountId) { |
| | | QueryWrapper<ManageAccountRole> queryAccountRoleWrapper = new QueryWrapper<>(); |
| | | queryAccountRoleWrapper.eq("is_delete",Constants.NOT_DELETE); |
| | | queryAccountRoleWrapper.eq("account_id",accountId); |
| | | ManageAccountRole accountRole = manageAccountRoleMapper.selectOne(queryAccountRoleWrapper); |
| | | if(ObjectUtils.isEmpty(accountRole)) |
| | | return null; |
| | | Integer roleId = accountRole.getRoleId(); |
| | | QueryWrapper<ManageRole> queryRoleWrapper = new QueryWrapper(); |
| | | queryRoleWrapper.eq("is_delete", Constants.NOT_DELETE); |
| | | queryRoleWrapper.eq("id", roleId); |
| | | return manageRoleMapper.selectOne(queryRoleWrapper); |
| | | } |
| | | |
| | | /** |
| | | * @Description: 补充父菜单 |
| | | * @Param: [list, menuId]list:menuId集合 |