|
|
@@ -795,8 +795,8 @@ class BetService extends BaseService
|
|
|
$sum = $otherSum + $fakeOtherSum;
|
|
|
$betNoticeNum = Config::where('field', 'bet_notice_num')->first()->val;
|
|
|
$betNoticeNum = explode(',', $betNoticeNum);
|
|
|
- $betNoticeMini = $betNoticeNum[0] ?? 26;
|
|
|
- $betNoticeMax = $betNoticeNum[1] ?? 38;
|
|
|
+ $betNoticeMini = max(1, (int)($betNoticeNum[0] ?? 26));
|
|
|
+ $betNoticeMax = max($betNoticeMini, (int)($betNoticeNum[1] ?? 38));
|
|
|
$noticeNum = rand($betNoticeMini, $betNoticeMax);
|
|
|
|
|
|
$realNoticeNum = ceil($noticeNum / 2);
|
|
|
@@ -1053,8 +1053,8 @@ class BetService extends BaseService
|
|
|
{
|
|
|
$betNoticeNum = Config::where('field', 'bet_notice_num')->first()->val;
|
|
|
$betNoticeNum = explode(',', $betNoticeNum);
|
|
|
- $betNoticeMini = $betNoticeNum[0] ?? 26;
|
|
|
- $betNoticeMax = $betNoticeNum[1] ?? 38;
|
|
|
+ $betNoticeMini = max(1, (int)($betNoticeNum[0] ?? 26));
|
|
|
+ $betNoticeMax = max($betNoticeMini, (int)($betNoticeNum[1] ?? 38));
|
|
|
$noticeNum = rand($betNoticeMini, $betNoticeMax);
|
|
|
// shuffle($openList);
|
|
|
// Log::error('lotteryNotice openList', $openList);
|
|
|
@@ -1065,7 +1065,10 @@ class BetService extends BaseService
|
|
|
$text = "{$issue_no} " . lang("期开奖结果");
|
|
|
$text .= "\n-----" . lang("本期开奖账单") . "----- \n";
|
|
|
App::setLocale($lang);
|
|
|
- foreach ($openList as $k => $v) {
|
|
|
+ $noticeIndex = 0;
|
|
|
+ $noticeRows = 0;
|
|
|
+ foreach ($openList as $v) {
|
|
|
+ $noticeIndex++;
|
|
|
|
|
|
|
|
|
$amount = number_format($v['amount'], 2);
|
|
|
@@ -1079,7 +1082,8 @@ class BetService extends BaseService
|
|
|
$openKeyword = implode(',', $v['openKeywords']);
|
|
|
}
|
|
|
|
|
|
- if (($k + 1) <= $noticeNum) {
|
|
|
+ if ($noticeIndex <= $noticeNum) {
|
|
|
+ $noticeRows++;
|
|
|
$lang = App::getLocale();
|
|
|
$group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
App::setLocale($group_language);
|
|
|
@@ -1133,8 +1137,15 @@ class BetService extends BaseService
|
|
|
'pc28_switch' => $pc28Switch,
|
|
|
'text_length' => strlen($text),
|
|
|
'open_list_count' => count($openList),
|
|
|
+ 'notice_num' => $noticeNum,
|
|
|
+ 'notice_rows' => $noticeRows,
|
|
|
]);
|
|
|
- SendTelegramGroupMessageJob::dispatch($text, $inlineButton, '', false, '--------------------------------')->afterCommit();
|
|
|
+ SendTelegramGroupMessageJob::dispatch($text, $inlineButton, '', false, '--------------------------------', [
|
|
|
+ 'message_type' => 'settlement_list',
|
|
|
+ 'issue_no' => $issue_no,
|
|
|
+ 'open_list_count' => count($openList),
|
|
|
+ 'notice_rows' => $noticeRows,
|
|
|
+ ])->afterCommit();
|
|
|
} else {
|
|
|
Log::channel('issue')->info('结算列表群通知跳过', [
|
|
|
'issue_no' => $issue_no,
|