|
|
@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@ -81,7 +82,7 @@ public class SysPermissionService { |
|
|
|
if (cache != null) { |
|
|
|
List<MenuDto> menus = StringUtils.cast(cache); |
|
|
|
List<String> ides = menus.stream().map(MenuDto::getCode).collect(Collectors.toList()); |
|
|
|
Map<String, MenuDto> map = menus.stream().collect(Collectors.toMap(MenuDto::getCode, m -> m)); |
|
|
|
Map<String, MenuDto> map = menus.stream().collect(Collectors.toMap(MenuDto::getCode, Function.identity(), (a, b) -> a)); |
|
|
|
return menuService.selectMenuList(ides).stream().map(item -> |
|
|
|
{ |
|
|
|
MenuDto dto = map.get(item.getId()); |
|
|
|