| | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.framework.security.config.SecurityProperties; |
| | | import com.iailab.framework.security.core.LoginUser; |
| | | import com.iailab.framework.security.core.util.SecurityFrameworkUtils; |
| | | import com.iailab.module.system.controller.admin.app.vo.AppMenuRespVO; |
| | | import com.iailab.module.system.controller.admin.app.vo.AppRespVO; |
| | |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | import static com.iailab.framework.common.util.collection.CollectionUtils.convertSet; |
| | | import static com.iailab.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| | | import static com.iailab.framework.security.core.util.SecurityFrameworkUtils.*; |
| | | import static com.iailab.framework.tenant.core.context.TenantContextHolder.getTenantId; |
| | | |
| | | |
| | |
| | | List<MenuDO> menuList = menuService.getMenuList(menuIds); |
| | | menuList = menuService.filterDisableMenus(menuList); |
| | | MenuDO menuDO = menuService.getMenuByAppId(id); |
| | | AppDO info = appService.getInfo(id); |
| | | List<MenuDO> children = new LinkedList<>(); |
| | | // 遍历每一层 |
| | | Collection<Long> parentIds = Collections.singleton(menuDO.getId()); |
| | |
| | | parentMenu.setVisible(true); |
| | | parentMenu.setAlwaysShow(false); |
| | | parentMenu.setParentId(menuDO.getId()); |
| | | parentMenu.setPath("/"); |
| | | menu.setParentId(parentMenu.getId()); |
| | | tempChildren.add(parentMenu); |
| | | tempChildren.add(menu); |
| | |
| | | tempChildren.add(menu); |
| | | } |
| | | }); |
| | | menuVOS = AuthConvert.INSTANCE.buildMenuTree(tempChildren, menuDO.getId(), menuDO.getPath()); |
| | | menuVOS = AuthConvert.INSTANCE.buildMenuTree(tempChildren, menuDO.getId(), menuDO.getPath(), info.getType()); |
| | | // 2. 拼接结果返回 |
| | | return success(menuVOS); |
| | | } |