first(); if (!$lottery) { dd('活动不存在'); } $ns = new NoticeService(); $users = TicketModel::where('lottery_id', $lottery->id)->whereNotIn('uid', [20000001, 20010000]) ->distinct() ->pluck('uid'); foreach ($users as $uid) { $ns->beforeLottery($uid, $lottery->id); } } }