mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
秒杀无法下单问题修复
This commit is contained in:
parent
f0389d7348
commit
5dc72970ee
@ -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)
|
||||
{
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user