bug表现为,积分抽奖活动设置的每人每天抽奖次数限制失败
修复方法:
找到文件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();
}
保存后重启守护进程