bug表現(xiàn)為,積分抽獎活動設(shè)置的每人每天抽獎次數(shù)限制失敗
修復(fù)方法:
找到文件app/dao/activity/lottery/LuckLotteryRecordDao.php
將getCount方法代碼整個替換
public function getCount(array $where, string $group = ''):int
{
$add_time = 0;
if (!empty($where['add_time'])) {
$add_time = $where['add_time'];
unset($where['add_time']);
}
return $this->search($where)->when($add_time > 0, function ($query) use ($where, $add_time) {
$query->where('add_time','>=', $add_time);
})->when($group, function ($query) use ($group) {
$query->group($group);
})->count();
}
保存后重啟守護進程