修改上传接口
build / build-push (push) Successful in 52s

This commit is contained in:
chenxing
2026-08-24 18:48:21 +08:00
parent a7539a4cf0
commit 5a7adb9ce3
15 changed files with 112 additions and 40 deletions
@@ -43,8 +43,11 @@ public class MenuBarServiceImpl implements IMenuBarService {
@Override
public List<MenuBar> findMenuBarById(Integer userId) {
UserCurrentRole userCurrentRole = userCurrentRoleService.findById(userId)
.orElseThrow(() -> new BizException(ErrorCode.INTERNAL_SERVER_ERROR));
Optional<UserCurrentRole> userCurrentRoleOpt = userCurrentRoleService.findById(userId);
if (!userCurrentRoleOpt.isPresent()) {
return Collections.emptyList();
}
UserCurrentRole userCurrentRole = userCurrentRoleOpt.get();
List<MenuBar> list = getMenuBarList(userCurrentRole.getSchId());
List<MenuBar> result = list.stream().filter(MenuBar::getIsShow).collect(Collectors.toList());
result = result.stream().sorted(Comparator.comparing(MenuBar::getOrderNum, Comparator.nullsLast(Integer::compareTo))).collect(Collectors.toList());