소스 검색

fix(order): 修复订单状态查询条件错误

- 修改 StoreOrder 模型中 takeStatus 方法的查询条件
- 将 where 条件从 'type' 字段改为 'change_type' 字段
- 确保正确获取订单的取餐状态记录
shichen 4 달 전
부모
커밋
15b462efb4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/common/model/store/order/StoreOrder.php

+ 1 - 1
app/common/model/store/order/StoreOrder.php

@@ -97,6 +97,6 @@ class StoreOrder extends BaseModel
97 97
     public function takeStatus()
98 98
     {
99 99
         return $this->hasOne(StoreOrderStatus::class,'order_id','order_id')
100
-            ->where('type', '=', 'take');
100
+            ->where('change_type', '=', 'take');
101 101
     }
102 102
 }