From 18dad0516ed80658b055b8cf39b04ee19350677c Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 21 May 2019 21:14:07 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E7=A7=9F=E6=88=B7=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/TenantController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java index fbb60e37..97e410fd 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java @@ -18,6 +18,7 @@ package org.springblade.system.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.*; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; @@ -116,5 +117,17 @@ public class TenantController extends BladeController { return R.status(tenantService.deleteLogic(Func.toLongList(ids))); } + /** + * 根据名称查询列表 + * + * @param name 租户名称 + */ + @GetMapping("/find-by-name") + @ApiOperation(value = "详情", notes = "传入tenant", position = 9) + public R> findByName(String name) { + List list = tenantService.list(Wrappers.query().lambda().like(Tenant::getTenantName, name)); + return R.data(list); + } + }