Bladeren bron

Merge branch 'refs/heads/master' into dev

sunxbiao 5 maanden geleden
bovenliggende
commit
820cf21f45
2 gewijzigde bestanden met toevoegingen van 9 en 1 verwijderingen
  1. 8 0
      app/common/dao/store/order/StoreOrderDao.php
  2. 1 1
      app/controller/admin/order/Order.php

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

@@ -123,6 +123,14 @@ class StoreOrderDao extends BaseDao
123
                         ->whereOr('order_id', 'in', $orderIdList);
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
             ->when(isset($where['reconciliation_type']) && $where['reconciliation_type'] !== '', function ($query) use ($where) {
134
             ->when(isset($where['reconciliation_type']) && $where['reconciliation_type'] !== '', function ($query) use ($where) {
127
                 $query->when($where['reconciliation_type'], function ($query) use ($where) {
135
                 $query->when($where['reconciliation_type'], function ($query) use ($where) {
128
                     $query->where('reconciliation_id', '<>', 0);
136
                     $query->where('reconciliation_id', '<>', 0);

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

@@ -65,7 +65,7 @@ class Order extends BaseController
65
     public function getAllList()
65
     public function getAllList()
66
     {
66
     {
67
         [$page, $limit] = $this->getPage();
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
         $pay_type=$this->request->param('pay_type');
70
         $pay_type=$this->request->param('pay_type');
71
         if($pay_type==1 || $pay_type==4){
71
         if($pay_type==1 || $pay_type==4){