|
@@ -2,11 +2,15 @@ package com.usky.system.controller.web;
|
|
|
|
|
|
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
+import com.usky.system.domain.SysMenu;
|
|
|
+import com.usky.system.service.ISysMenuService;
|
|
|
import com.usky.system.service.SysPlatformMenuService;
|
|
|
import com.usky.system.service.vo.TenantMenuVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -22,6 +26,9 @@ public class AuthorityConfigController {
|
|
|
@Autowired
|
|
|
private SysPlatformMenuService sysPlatformMenuService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysMenuService menuService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 租户管理-权限配置-目录查询
|
|
@@ -36,6 +43,24 @@ public class AuthorityConfigController {
|
|
|
return ApiResult.success(sysPlatformMenuService.getMenuList(platformId, tenantId));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 租户管理-权限配置-目录查询
|
|
|
+ *
|
|
|
+ * @param platformId 平台ID
|
|
|
+ * @param tenantId 租户ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("getAuthorityConfigMenuList")
|
|
|
+ public ApiResult<Map<String, Object>> getAuthorityConfigMenuList(@RequestParam(value = "platformId") Integer platformId,
|
|
|
+ @RequestParam(value = "tenantId") Integer tenantId) {
|
|
|
+ List<SysMenu> menus =sysPlatformMenuService.getPlatformMenuList(platformId);
|
|
|
+ Map<String, Object> ajax = new HashMap<>();
|
|
|
+ ajax.put("checkedKeys", sysPlatformMenuService.selectPlatformMenu(tenantId));
|
|
|
+ ajax.put("menus", menuService.buildMenuTreeSelect(menus));
|
|
|
+ return ApiResult.success(ajax);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 租户管理-权限配置-目录保存
|
|
|
*
|