- 修改 StoreOrder 模型中 takeStatus 方法的查询条件 - 将 where 条件从 'type' 字段改为 'change_type' 字段 - 确保正确获取订单的取餐状态记录
@@ -97,6 +97,6 @@ class StoreOrder extends BaseModel
public function takeStatus()
{
return $this->hasOne(StoreOrderStatus::class,'order_id','order_id')
- ->where('type', '=', 'take');
+ ->where('change_type', '=', 'take');
}