Преглед изворни кода

平台后台-订单列表-支持关键字搜索订单数据

Xpy пре 8 месеци
родитељ
комит
52d1315980
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      app/common/repositories/store/order/StoreOrderRepository.php

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

@@ -5141,7 +5141,12 @@ class StoreOrderRepository extends BaseRepository
5141 5141
                     return $query->field('uid,phone,nickname');
5142 5142
                 }
5143 5143
             ]);
5144
-
5144
+        if (!empty($where['keywords'])) {
5145
+            /** @var StoreOrderProductRepository $storeOrderProductRepository */
5146
+            $storeOrderProductRepository = app()->make(StoreOrderProductRepository::class);
5147
+            $orderIdList = $storeOrderProductRepository->getOrderIdListByKeyword($where['keywords']);
5148
+            $query->whereIn('order_id', $orderIdList);
5149
+        }
5145 5150
         $kw = trim($where['product_keywords'] ?? '');
5146 5151
         if ($kw !== '') {
5147 5152
             $ids = Db::name('store_order_product')