Explorar o código

Merge branch 'refs/heads/master' into dev

sunxbiao hai 5 meses
pai
achega
820cf21f45

+ 8 - 0
app/common/dao/store/order/StoreOrderDao.php

@@ -123,6 +123,14 @@ class StoreOrderDao extends BaseDao
123 123
                         ->whereOr('order_id', 'in', $orderIdList);
124 124
                 });
125 125
             })
126
+            ->when(isset($where['product_keywords']) && $where['product_keywords'] !== '', function ($query) use ($where) {
127
+                $query->where(function ($query) use ($where) {
128
+                    /** @var StoreOrderProductRepository $storeOrderProductRepository */
129
+                    $storeOrderProductRepository = app()->make(StoreOrderProductRepository::class);
130
+                    $orderIdList = $storeOrderProductRepository->getOrderIdListByKeyword($where['product_keywords']);
131
+                    $query->where('order_id', 'in', $orderIdList);
132
+                });
133
+            })
126 134
             ->when(isset($where['reconciliation_type']) && $where['reconciliation_type'] !== '', function ($query) use ($where) {
127 135
                 $query->when($where['reconciliation_type'], function ($query) use ($where) {
128 136
                     $query->where('reconciliation_id', '<>', 0);

+ 1 - 1
app/controller/admin/order/Order.php

@@ -65,7 +65,7 @@ class Order extends BaseController
65 65
     public function getAllList()
66 66
     {
67 67
         [$page, $limit] = $this->getPage();
68
-        $where = $this->request->params(['type', 'date', 'mer_id','keywords','status','username','order_sn','order_ids','paid', 'zero_line_uid']);
68
+        $where = $this->request->params(['type', 'date', 'mer_id', 'keywords', 'product_keywords', 'status', 'username', 'order_sn', 'order_ids', 'paid', 'zero_line_uid']);
69 69
 
70 70
         $pay_type=$this->request->param('pay_type');
71 71
         if($pay_type==1 || $pay_type==4){