From a606102debcf7954e873fa22652e22de324db5ac Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 15 Apr 2020 12:09:37 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/springblade/system/controller/PostController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }