From 0bfa8b21ded2ce11eb16f9fc8389b2c87658c753 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Wed, 6 Nov 2024 17:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E8=B4=A6=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreLogic.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index aeeeb94d..46e16393 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -274,13 +274,16 @@ class LocalStoreLogic extends Logic public function getLocalOrderList($data) { - $where[] = []; + $where = []; if (!empty($data['start_time']) && !empty($data['end_time']) ) { - $where[] = ['lso.create_time', '>=', $data['start_time']]; - $where[] = ['lso.create_time', '<=', $data['end_time']]; + $where[] = ['lso.create_time', '>=', $data['start_time'] . ' 00:00:00']; + $where[] = ['lso.create_time', '<=', $data['end_time'] . '23:59:59']; } - $count = LocalStoreOrder::where(['lstore_id' => $data['lstore_id'], 'pay_shop_type' => 1, 'state' => 1])->count(); + $count = LocalStoreOrder::alias('lso') + ->where(['lstore_id' => $data['lstore_id'], 'pay_shop_type' => 1, 'state' => 1]) + ->where($where) + ->count(); $lists = LocalStoreOrder::alias('lso') ->field('lso.*, u.id, u.nickname')