From 7bb71ae44e59fd6d2f930116e958bff56475b5dc Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 17 Oct 2024 14:43:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E6=9F=A5=E8=AF=A2=E4=B8=AD=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 从数据列表的查询中移除了'pay_price'和'deduction_price'两个未使用的字段。这将减少数据库查询的数据量,提高性能。 --- app/admin/lists/beforehand_order/BeforehandOrderLists.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/lists/beforehand_order/BeforehandOrderLists.php b/app/admin/lists/beforehand_order/BeforehandOrderLists.php index 8a29d67b2..cbefa10ce 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderLists.php @@ -45,7 +45,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte public function lists(): array { return BeforehandOrder::where($this->searchWhere) - ->field(['id','order_id','store_id','uid','order_type','total_num','total_price','outbound_id','admin_id', 'pay_price', 'deduction_price','create_time', 'status', 'mark','warehousing_id']) + ->field(['id','order_id','store_id','uid','order_type','total_num','total_price','outbound_id','admin_id','create_time', 'status', 'mark','warehousing_id']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($item){