From 5dc72970ee0a162ba58f8724f68cec8181b2025c Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:11:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=92=E6=9D=80=E6=97=A0=E6=B3=95=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/seckill/StoreSeckillDao.php | 3 ++- .../app/services/activity/coupon/StoreCouponIssueServices.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crmeb/app/dao/activity/seckill/StoreSeckillDao.php b/crmeb/app/dao/activity/seckill/StoreSeckillDao.php index 7034905d1..efcb6cbbe 100644 --- a/crmeb/app/dao/activity/seckill/StoreSeckillDao.php +++ b/crmeb/app/dao/activity/seckill/StoreSeckillDao.php @@ -41,7 +41,7 @@ class StoreSeckillDao extends BaseDao */ public function search(array $where = [], bool $search = false) { - return parent::search($where, $search)->when(isset($where['seckllTime']), function ($query) use ($where) { + return parent::search($where)->when(isset($where['seckllTime']), function ($query) use ($where) { [$startTime, $stopTime] = is_array($where['seckllTime']) ? $where['seckllTime'] : [time(), time() - 86400]; $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime); })->when(isset($where['sid']) && $where['sid'], function ($query) use ($where) { @@ -67,6 +67,7 @@ class StoreSeckillDao extends BaseDao * 条件获取数量 * @param array $where * @return int + * @throws \ReflectionException */ public function getCount(array $where) { diff --git a/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php b/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php index bb667dabc..6c88aff60 100644 --- a/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php +++ b/crmeb/app/services/activity/coupon/StoreCouponIssueServices.php @@ -65,8 +65,7 @@ class StoreCouponIssueServices extends BaseServices foreach ($list as &$item) { $item['use_time'] = date('Y-m-d', $item['start_use_time']) . ' ~ ' . date('Y-m-d', $item['end_use_time']); } -// unset($where['type'], $where['receive_type']); - $count = $this->dao->count($where); + $count = $this->dao->couponCount($where); return compact('list', 'count'); }