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); + } + }