From 767b35f65d403d39695c51767e2233f75e856d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 17 Mar 2021 18:05:37 +0800 Subject: [PATCH] Update ShopOrderSend.php --- app/data/controller/ShopOrderSend.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/data/controller/ShopOrderSend.php b/app/data/controller/ShopOrderSend.php index 0deaae0fa..0e9064201 100644 --- a/app/data/controller/ShopOrderSend.php +++ b/app/data/controller/ShopOrderSend.php @@ -33,7 +33,7 @@ class ShopOrderSend extends Controller $this->address = sysdata('ordersend'); // 状态数据统计 $this->total = ['t0' => 0, 't1' => 0, 't2' => 0, 'ta' => 0]; - $db = $this->app->db->name('ShopOrder')->whereIn('status', [4, 5, 6]); + $db = $this->app->db->name('ShopOrder')->whereIn('status', [4, 5, 6])->where(['truck_type' => 1]); $query = $this->app->db->name($this->table)->whereRaw("order_no in {$db->field('order_no')->buildSql()}"); foreach ($query->fieldRaw('status,count(1) total')->group('status')->cursor() as $vo) { $this->total["t{$vo['status']}"] = $vo['total']; @@ -47,8 +47,8 @@ class ShopOrderSend extends Controller $db = $this->_query('DataUser')->like('phone#user_phone,nickname#user_nickname')->db(); if ($db->getOptions('where')) $query->whereRaw("uid in {$db->field('id')->buildSql()}"); // 订单搜索查询 - $db = $this->_query('ShopOrder')->whereIn('status', [4, 5, 6])->db(); - if ($db->getOptions('where')) $query->whereRaw("order_no in {$db->field('order_no')->buildSql()}"); + $db = $this->_query('ShopOrder')->whereIn('status', [4, 5, 6])->where(['truck_type' => 1])->db(); + $query->whereRaw("order_no in {$db->field('order_no')->buildSql()}"); // 列表选项卡状态 if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) { $query->where(['status' => $this->type]);