diff --git a/plugin/dish/dish.go b/plugin/dish/dish.go index 5edf7940..6fd99858 100644 --- a/plugin/dish/dish.go +++ b/plugin/dish/dish.go @@ -77,7 +77,8 @@ func init() { } var d dish - if err := db.Find("dish", &d, fmt.Sprintf("WHERE name like %%%s%%", dishName)); err != nil { + if err := db.Find("dish", &d, fmt.Sprintf("WHERE name like '%%%s%%'", dishName)); err != nil { + ctx.SendChain(message.Text("客官,本店没有" + dishName)) return } @@ -86,7 +87,7 @@ func init() { "原材料:%s\n"+ "步骤:\n"+ "%s", - name, dishName, d.Materials, d.Steps), + name, d.Name, d.Materials, d.Steps), )) })