sunxbiao 1 год назад
Родитель
Сommit
32880fac14

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

@@ -4641,25 +4641,25 @@ class StoreOrderRepository extends BaseRepository
4641
             $q->whereIn('order_id', $order_ids);
4641
             $q->whereIn('order_id', $order_ids);
4642
         })->count();
4642
         })->count();
4643
         $statusAll = $all;
4643
         $statusAll = $all;
4644
-        $unpaid = $this->dao->search(array_merge($where, ['paid' => 0, 'is_del' => 0, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4644
+        $unpaid = $this->dao->search(array_merge(['paid' => 0, 'is_del' => 0, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4645
             $q->whereIn('order_id', $order_ids);
4645
             $q->whereIn('order_id', $order_ids);
4646
         })->count();
4646
         })->count();
4647
-        $unshipped = $this->dao->search(array_merge($where, ['status' => 0, 'paid' => 1, 'is_del' => 0, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4647
+        $unshipped = $this->dao->search(array_merge(['status' => 0, 'paid' => 1, 'is_del' => 0, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4648
             $q->whereIn('order_id', $order_ids);
4648
             $q->whereIn('order_id', $order_ids);
4649
         })->count();
4649
         })->count();
4650
-        $untake = $this->dao->search(array_merge($where, ['status' => 1, 'is_del' => 0, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4650
+        $untake = $this->dao->search(array_merge(['status' => 1, 'is_del' => 0, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4651
             $q->whereIn('order_id', $order_ids);
4651
             $q->whereIn('order_id', $order_ids);
4652
         })->count();
4652
         })->count();
4653
-        $unevaluate = $this->dao->search(array_merge($where, ['status' => 2, 'is_del' => 0, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4653
+        $unevaluate = $this->dao->search(array_merge(['status' => 2, 'is_del' => 0, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4654
             $q->whereIn('order_id', $order_ids);
4654
             $q->whereIn('order_id', $order_ids);
4655
         })->count();
4655
         })->count();
4656
-        $complete = $this->dao->search(array_merge($where, ['status' => 3, 'is_del' => 0, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4656
+        $complete = $this->dao->search(array_merge(['status' => 3, 'is_del' => 0, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4657
             $q->whereIn('order_id', $order_ids);
4657
             $q->whereIn('order_id', $order_ids);
4658
         })->count();
4658
         })->count();
4659
-        $refund = $this->dao->search(array_merge($where, ['status' => -1, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4659
+        $refund = $this->dao->search(array_merge(['status' => -1, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4660
             $q->whereIn('order_id', $order_ids);
4660
             $q->whereIn('order_id', $order_ids);
4661
         })->count();
4661
         })->count();
4662
-        $del = $this->dao->search(array_merge($where, ['is_del' => 1, 'order_type' => $orderType]), null)->when($order_ids, function ($q) use ($order_ids) {
4662
+        $del = $this->dao->search(array_merge(['is_del' => 1, 'order_type' => $orderType], $where), null)->when($order_ids, function ($q) use ($order_ids) {
4663
             $q->whereIn('order_id', $order_ids);
4663
             $q->whereIn('order_id', $order_ids);
4664
         })->count();
4664
         })->count();
4665
 
4665
 

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

@@ -101,7 +101,7 @@ class Order extends BaseController
101
      */
101
      */
102
     public function chart()
102
     public function chart()
103
     {
103
     {
104
-        $where = $this->request->params(['type', 'date', 'mer_id','keywords','username','order_sn','order_ids']);
104
+        $where = $this->request->params(['type', 'date', 'mer_id','keywords','username','order_sn','order_ids','paid']);
105
         return app('json')->success($this->repository->adminOrderNumber(-1, $where));
105
         return app('json')->success($this->repository->adminOrderNumber(-1, $where));
106
     }
106
     }
107
 
107