多租户层级查询优化
This commit is contained in:
+13
-4
@@ -1,9 +1,6 @@
|
||||
package com.central.user.controller;
|
||||
|
||||
import com.central.common.model.CodeEnum;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.model.Tenant;
|
||||
import com.central.common.model.TenantInfo;
|
||||
import com.central.common.model.*;
|
||||
import com.central.common.service.ITenantHierarchyService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -171,6 +168,18 @@ public class TenantHierarchyController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取自己以及子孙租户
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
*/
|
||||
@GetMapping(value = "/son/tenantId", params = "tenantId")
|
||||
@Operation(summary = "获取自己以及子孙租户")
|
||||
public List<String> getSonTenantIds(String tenantId) {
|
||||
return tenantHierarchyService.getAllSubTenantIds(tenantId);
|
||||
}
|
||||
|
||||
private String normalizePathForSave(String rawPath, String parentId, String tenantId) {
|
||||
try {
|
||||
String path = stripPathSafe(rawPath);
|
||||
|
||||
Reference in New Issue
Block a user