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')