新增接口:getTenantId/{key}
This commit is contained in:
@@ -75,6 +75,14 @@ public class TenantController extends BaseController {
|
||||
return success(tenant);
|
||||
}
|
||||
|
||||
@ApiOperation("根据关键词搜索租户ID")
|
||||
@GetMapping("/getTenantId/{key}")
|
||||
public ApiResult<Tenant> getTenantIdByKeywords(@PathVariable("key") String keywords) {
|
||||
// 使用关联查询
|
||||
final Tenant tenant = tenantService.getOne(new LambdaUpdateWrapper<Tenant>().eq(Tenant::getTenantId, keywords).or().eq(Tenant::getTenantCode, keywords).last("limit 1"));
|
||||
return success(tenant);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:tenant:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("添加租户")
|
||||
|
||||
Reference in New Issue
Block a user