mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 优化 租户套餐菜单查询过滤掉 租户管理相关菜单
This commit is contained in:
		@@ -21,6 +21,7 @@ import org.dromara.system.service.ISysMenuService;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -111,9 +112,14 @@ public class SysMenuController extends BaseController {
 | 
			
		||||
    @GetMapping(value = "/tenantPackageMenuTreeselect/{packageId}")
 | 
			
		||||
    public R<MenuTreeSelectVo> tenantPackageMenuTreeselect(@PathVariable("packageId") Long packageId) {
 | 
			
		||||
        List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId());
 | 
			
		||||
        MenuTreeSelectVo selectVo = new MenuTreeSelectVo(
 | 
			
		||||
            menuService.selectMenuListByPackageId(packageId),
 | 
			
		||||
            menuService.buildMenuTreeSelect(menus));
 | 
			
		||||
        List<Tree<Long>> list = menuService.buildMenuTreeSelect(menus);
 | 
			
		||||
        // 删除租户管理菜单
 | 
			
		||||
        list.removeIf(menu -> menu.getId() == 6L);
 | 
			
		||||
        List<Long> ids = new ArrayList<>();
 | 
			
		||||
        if (packageId > 0L) {
 | 
			
		||||
            ids = menuService.selectMenuListByPackageId(packageId);
 | 
			
		||||
        }
 | 
			
		||||
        MenuTreeSelectVo selectVo = new MenuTreeSelectVo(ids, list);
 | 
			
		||||
        return R.ok(selectVo);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user