问题说明:抽奖无法获取当天抽奖次数
修改方式:
修改文件:app\dao\activity\lottery\LuckLotteryRecordDao
修改方法:
public function getCount(array $where, string $group = '')
{
$add_time = 0;
if (isset($where['add_time']) && $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();
}