6/19 完成菜品管理页面搜索按钮
This commit is contained in:
parent
ee47200b4e
commit
395b60115a
@ -24,10 +24,12 @@ public class DishServiceImpl extends CrudServiceImpl<DishDao, DishEntity, DishDT
|
|||||||
public QueryWrapper<DishEntity> getWrapper(Map<String, Object> params){
|
public QueryWrapper<DishEntity> getWrapper(Map<String, Object> params){
|
||||||
String id = (String)params.get("id");
|
String id = (String)params.get("id");
|
||||||
String categoryId = (String)params.get("categoryId");
|
String categoryId = (String)params.get("categoryId");
|
||||||
|
String name = (String)params.get("name");
|
||||||
|
|
||||||
QueryWrapper<DishEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<DishEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
|
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
|
||||||
wrapper.eq(StringUtils.isNotBlank(categoryId), "category_id", categoryId);
|
wrapper.eq(StringUtils.isNotBlank(categoryId), "category_id", categoryId);
|
||||||
|
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
||||||
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user