6/19 完成菜品管理页面搜索按钮

This commit is contained in:
zyx 2023-06-19 16:47:40 +08:00
parent ee47200b4e
commit 395b60115a

View File

@ -24,10 +24,12 @@ public class DishServiceImpl extends CrudServiceImpl<DishDao, DishEntity, DishDT
public QueryWrapper<DishEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
String categoryId = (String)params.get("categoryId");
String name = (String)params.get("name");
QueryWrapper<DishEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
wrapper.eq(StringUtils.isNotBlank(categoryId), "category_id", categoryId);
wrapper.like(StringUtils.isNotBlank(name), "name", name);
return wrapper;
}