diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java index 056acc2e..94672f5c 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java @@ -17,6 +17,7 @@ package org.springblade.system.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -25,6 +26,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Post; @@ -130,8 +132,8 @@ public class PostController extends BladeController { @GetMapping("/select") @ApiOperationSupport(order = 8) @ApiOperation(value = "下拉数据源", notes = "传入post") - public R> select(Post post) { - List list = postService.list(Condition.getQueryWrapper(post)); + public R> select(String tenantId, BladeUser bladeUser) { + List list = postService.list(Wrappers.query().lambda().eq(Post::getTenantId, Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()))); return R.data(list); }