Commit 9903e75f authored by 廖旭伟's avatar 廖旭伟

角色功能授权bug修改

parent bf70899d
......@@ -3,16 +3,16 @@ package com.mortals.xhx.module.role.service.impl;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.menu.model.MenuQuery;
import com.mortals.xhx.module.menu.service.MenuService;
import com.mortals.xhx.module.role.dao.RoleAuthDao;
import com.mortals.xhx.module.role.model.*;
import com.mortals.xhx.module.role.model.RoleAuthEntity;
import com.mortals.xhx.module.role.model.RoleAuthQuery;
import com.mortals.xhx.module.role.model.RoleModelEntity;
import com.mortals.xhx.module.role.service.RoleAuthService;
import com.mortals.xhx.module.role.service.RoleModelService;
import com.mortals.xhx.module.role.service.RoleUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
......@@ -104,6 +104,9 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
List<RoleAuthEntity> roleModelEntities = this.find(condition);
if (CollectionUtils.isNotEmpty(roleModelEntities)) {
List<Long> menuIds = roleModelEntities.stream().filter(m->m.getMenuId()!=null).map(RoleAuthEntity::getMenuId).collect(Collectors.toList());
if(CollectionUtils.isEmpty(menuIds)){
return Collections.emptyMap();
}
MenuQuery query1 = new MenuQuery();
query1.setIdList(menuIds);
List<MenuEntity> menuEntities = menuService.find(query1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment