diff --git a/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/controller/SpdmTenantController.java b/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/controller/SpdmTenantController.java index a50ae9b..a414313 100644 --- a/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/controller/SpdmTenantController.java +++ b/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/controller/SpdmTenantController.java @@ -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> getAllTenant() { + return ResponseR.ok(remoteTenantServiceFeign.getAll().getData()); + } + } diff --git a/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/feign/RemoteTenantServiceFeign.java b/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/feign/RemoteTenantServiceFeign.java index a89481f..ecfaa41 100644 --- a/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/feign/RemoteTenantServiceFeign.java +++ b/honeycom-spdm/src/main/java/com/honeycombis/honeycom/spdm/feign/RemoteTenantServiceFeign.java @@ -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> findStaffListByUserId(@RequestParam Long userId, @RequestHeader(SecurityConstants.FROM) String from); + @GetMapping("/sysTenant/getAll" ) + R> getAll(); + } diff --git a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/controller/SysTenantController.java b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/controller/SysTenantController.java index e595bec..a9ce1be 100644 --- a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/controller/SysTenantController.java +++ b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/controller/SysTenantController.java @@ -68,6 +68,7 @@ public class SysTenantController { @Operation(summary = "查询所有租户" , description = "查询所有租户" ) @GetMapping("/getAll" ) + @Inner(false) // @PreAuthorize("@pms.hasPermission('tenant_sysTenant_view')" ) public R> getAll() { return R.ok(sysTenantService.getAll());