Browse Source

🎉 租户增加模糊查询api

test
smallchill 6 years ago
parent
commit
18dad0516e
  1. 13
      blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java

13
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<List<Tenant>> findByName(String name) {
List<Tenant> list = tenantService.list(Wrappers.<Tenant>query().lambda().like(Tenant::getTenantName, name));
return R.data(list);
}
}

Loading…
Cancel
Save