Browse Source

fix(order):修复订单详情查询参数类型问题

- 移除了订单ID的强制整型转换
- 修改订单详情查询条件从group_order_id为order_sn
-保持订单删除状态过滤条件
- 保留关联订单商品和商户信息查询逻辑
shichen 10 months ago
parent
commit
153e9fe674

+ 1 - 1
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2629,7 +2629,7 @@ class StoreOrderRepository extends BaseRepository
2629
         $where = [];
2629
         $where = [];
2630
         if ($uid) $where['uid'] = $uid;
2630
         if ($uid) $where['uid'] = $uid;
2631
 
2631
 
2632
-        $data = $this->dao->search($where)->where('group_order_id', $id)->where('is_del', 0)->with([
2632
+        $data = $this->dao->search($where)->where('order_sn', $id)->where('is_del', 0)->with([
2633
             'orderProduct', 'merchant' => function ($query) {
2633
             'orderProduct', 'merchant' => function ($query) {
2634
                 return $query->field('mer_id,mer_name,mer_avatar,business_id');
2634
                 return $query->field('mer_id,mer_name,mer_avatar,business_id');
2635
             }
2635
             }

+ 1 - 1
app/controller/api/store/order/StoreOrder.php

@@ -909,7 +909,7 @@ class StoreOrder extends BaseController
909
      */
909
      */
910
     public function detail($id)
910
     public function detail($id)
911
     {
911
     {
912
-        $order = $this->repository->getDetail((int)$id);
912
+        $order = $this->repository->getDetail($id);
913
 //        $order = $this->repository->getDetail((int)$id, $this->request->uid());
913
 //        $order = $this->repository->getDetail((int)$id, $this->request->uid());
914
         if (!$order)
914
         if (!$order)
915
             return app('json')->fail('订单不存在');
915
             return app('json')->fail('订单不存在');