查询全部租户

This commit is contained in:
2025-12-16 13:52:23 +08:00
parent 3172d37788
commit fac647083e
3 changed files with 14 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ import com.honeycombis.honeycom.spdm.feign.RemoteTenantServiceFeign;
import com.honeycombis.honeycom.spdm.util.PageResult;
import com.honeycombis.honeycom.spdm.util.ResponseR;
import com.honeycombis.honeycom.tenant.vo.tenant.SysTenantVO;
import com.honeycombis.honeycom.tenant.vo.tenant.TenantVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
@@ -34,6 +35,7 @@ import lombok.AllArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@@ -69,4 +71,10 @@ public class SpdmTenantController {
return ResponseR.ok();
}
@Operation(summary = "查询所有租户" , description = "查询所有租户" )
@GetMapping("/getAllTenant" )
public ResponseR<List<TenantVO>> getAllTenant() {
return ResponseR.ok(remoteTenantServiceFeign.getAll().getData());
}
}

View File

@@ -14,9 +14,11 @@ import com.honeycombis.honeycom.tenant.vo.SysDeptVO;
import com.honeycombis.honeycom.tenant.vo.SysRoleVO;
import com.honeycombis.honeycom.tenant.vo.SysStaffVO;
import com.honeycombis.honeycom.tenant.vo.tenant.SysTenantVO;
import com.honeycombis.honeycom.tenant.vo.tenant.TenantVO;
import com.honeycombis.honeycom.tenant.vo.tenant.TenantViewVO;
import com.honeycombis.honeycom.user.vo.SysUserInfoVO;
import com.honeycombis.honeycom.user.vo.SysUserVO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
@@ -48,4 +50,7 @@ public interface RemoteTenantServiceFeign {
@GetMapping("/sysStaff/findStaffListByUserId")
R<List<SysStaffVO>> findStaffListByUserId(@RequestParam Long userId, @RequestHeader(SecurityConstants.FROM) String from);
@GetMapping("/sysTenant/getAll" )
R<List<TenantVO>> getAll();
}

View File

@@ -68,6 +68,7 @@ public class SysTenantController {
@Operation(summary = "查询所有租户" , description = "查询所有租户" )
@GetMapping("/getAll" )
@Inner(false)
// @PreAuthorize("@pms.hasPermission('tenant_sysTenant_view')" )
public R<List<TenantVO>> getAll() {
return R.ok(sysTenantService.getAll());