彩票购票成功增加全站系统广播
This commit is contained in:
@@ -86,6 +86,7 @@ class LotteryService
|
|||||||
$user, $numbers, $issue, $ticketPrice, $poolRatio, $quickPick, &$tickets
|
$user, $numbers, $issue, $ticketPrice, $poolRatio, $quickPick, &$tickets
|
||||||
) {
|
) {
|
||||||
foreach ($numbers as $idx => $num) {
|
foreach ($numbers as $idx => $num) {
|
||||||
|
// ...existing validation/DB storing logic...
|
||||||
$reds = $num['reds'];
|
$reds = $num['reds'];
|
||||||
sort($reds); // 红球排序存储,方便比对
|
sort($reds); // 红球排序存储,方便比对
|
||||||
|
|
||||||
@@ -130,6 +131,12 @@ class LotteryService
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 用户成功购买后,发送系统传音广播(大家都能看到他买了彩票)
|
||||||
|
$firstTicket = $tickets[0];
|
||||||
|
$numsStr = $firstTicket->numbersLabel();
|
||||||
|
$moreStr = $buyCount > 1 ? "等 {$buyCount} 注号码" : '';
|
||||||
|
$this->pushSystemMessage("🎟️ 【双色球彩票】财神爷保佑!玩家【{$user->username}】豪掷千金,购买了当前 #{$issue->issue_no} 期双色球 {$numsStr} {$moreStr},祝 Ta 中大奖!");
|
||||||
|
|
||||||
return $tickets;
|
return $tickets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user