|
@@ -249,9 +249,22 @@ class BetService extends BaseService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 期数验证
|
|
// 期数验证
|
|
|
- $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
|
|
+ if ($pc28Switch == 1) {
|
|
|
|
|
+ $issueInfo = PcIssue::where('status', PcIssue::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (empty($issueInfo)) {
|
|
if (empty($issueInfo)) {
|
|
|
- $issueCloseInfo = IssueService::model()::where('status', IssueService::model()::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
|
|
|
|
+ if ($pc28Switch == 1) {
|
|
|
|
|
+ $issueCloseInfo = PcIssue::where('status', PcIssue::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $issueCloseInfo = IssueService::model()::where('status', IssueService::model()::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (empty($issueCloseInfo)) {
|
|
if (empty($issueCloseInfo)) {
|
|
|
$errText .= lang("暂无可下注期数,本次下注无效!");
|
|
$errText .= lang("暂无可下注期数,本次下注无效!");
|
|
|
return false;
|
|
return false;
|
|
@@ -342,13 +355,17 @@ class BetService extends BaseService
|
|
|
$lastStr = self::hideMiddleDigits($userInfo->member_id, 4);
|
|
$lastStr = self::hideMiddleDigits($userInfo->member_id, 4);
|
|
|
|
|
|
|
|
$issueNo = $issueInfo->issue_no;
|
|
$issueNo = $issueInfo->issue_no;
|
|
|
|
|
+
|
|
|
|
|
+ $lang = App::getLocale();
|
|
|
|
|
+ $group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
|
|
+ App::setLocale($group_language);
|
|
|
$groupText = lang("会员下注") . " 【" . $lastStr . "】 \n";
|
|
$groupText = lang("会员下注") . " 【" . $lastStr . "】 \n";
|
|
|
$groupText .= lang('下注期数') . ":{$issueInfo->issue_no} \n";
|
|
$groupText .= lang('下注期数') . ":{$issueInfo->issue_no} \n";
|
|
|
$groupText .= lang("下注内容") . ": \n";
|
|
$groupText .= lang("下注内容") . ": \n";
|
|
|
$groupText .= "----------- \n";
|
|
$groupText .= "----------- \n";
|
|
|
$groupText .= "{$keywords}{$amount} \n";
|
|
$groupText .= "{$keywords}{$amount} \n";
|
|
|
$groupText .= "----------- \n";
|
|
$groupText .= "----------- \n";
|
|
|
-
|
|
|
|
|
|
|
+ App::setLocale($lang);
|
|
|
|
|
|
|
|
$inlineButton = self::getOperateButton();
|
|
$inlineButton = self::getOperateButton();
|
|
|
|
|
|
|
@@ -358,9 +375,20 @@ class BetService extends BaseService
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //随机虚拟下注
|
|
|
|
|
+ public static function randomVirtualBetting($maxPeople = 1): void
|
|
|
|
|
+ {
|
|
|
|
|
+ $maxPeople = intval($maxPeople);
|
|
|
|
|
+ $maxPeople = max($maxPeople, 1);
|
|
|
|
|
+ $maxPeople = min($maxPeople, 20);
|
|
|
|
|
+ $num = rand(1, $maxPeople);
|
|
|
|
|
+ for ($i = 0; $i < $num; $i++) {
|
|
|
|
|
+ static::fakeBet();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 模拟下注
|
|
// 模拟下注
|
|
|
- public static function fakeBet()
|
|
|
|
|
|
|
+ private static function fakeBet()
|
|
|
{
|
|
{
|
|
|
$noRule = ['0操', '27操'];
|
|
$noRule = ['0操', '27操'];
|
|
|
// 防止一开就虚拟投注
|
|
// 防止一开就虚拟投注
|
|
@@ -377,13 +405,12 @@ class BetService extends BaseService
|
|
|
$betFake = Config::where('field', 'bet_fake')->first()->val;
|
|
$betFake = Config::where('field', 'bet_fake')->first()->val;
|
|
|
if ($betFake) {
|
|
if ($betFake) {
|
|
|
// 期数验证
|
|
// 期数验证
|
|
|
-
|
|
|
|
|
-// $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
|
|
-// if ($pc28Switch == 1) {
|
|
|
|
|
-// $issueInfo = PcIssue::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
-// } else {
|
|
|
|
|
-// }
|
|
|
|
|
- $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
|
|
+ $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
|
|
+ if ($pc28Switch == 1) {
|
|
|
|
|
+ $issueInfo = PcIssue::where('status', PcIssue::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if ($issueInfo) {
|
|
if ($issueInfo) {
|
|
|
$betFakeRandAmount = Config::where('field', 'bet_fake_rand_amount')->first()->val;
|
|
$betFakeRandAmount = Config::where('field', 'bet_fake_rand_amount')->first()->val;
|
|
@@ -439,15 +466,16 @@ class BetService extends BaseService
|
|
|
$fake_bet_list[] = $item;
|
|
$fake_bet_list[] = $item;
|
|
|
|
|
|
|
|
$lastStr = self::hideMiddleDigits($item['member_id'], 4);
|
|
$lastStr = self::hideMiddleDigits($item['member_id'], 4);
|
|
|
-
|
|
|
|
|
- $groupText = "";
|
|
|
|
|
- $groupText .= "会员下注 【" . $lastStr . "】 \n";
|
|
|
|
|
- $groupText .= "下注期数:{$issueInfo->issue_no} \n";
|
|
|
|
|
- $groupText .= "下注内容: \n";
|
|
|
|
|
|
|
+ $lang = App::getLocale();
|
|
|
|
|
+ $group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
|
|
+ App::setLocale($group_language);
|
|
|
|
|
+ $groupText = lang('会员下注') . " 【" . $lastStr . "】 \n";
|
|
|
|
|
+ $groupText .= lang('下注期数') . ":{$issueInfo->issue_no} \n";
|
|
|
|
|
+ $groupText .= lang('下注内容') . ": \n";
|
|
|
$groupText .= "----------- \n";
|
|
$groupText .= "----------- \n";
|
|
|
$groupText .= "{$input} \n";
|
|
$groupText .= "{$input} \n";
|
|
|
$groupText .= "----------- \n";
|
|
$groupText .= "----------- \n";
|
|
|
-
|
|
|
|
|
|
|
+ App::setLocale($lang);
|
|
|
|
|
|
|
|
if (strtotime($issueInfo['end_time']) - strtotime($now_date) < 22) {
|
|
if (strtotime($issueInfo['end_time']) - strtotime($now_date) < 22) {
|
|
|
$fake_bet_count = Cache::get("fake_bet_count_{$issueInfo->issue_no}", 0);
|
|
$fake_bet_count = Cache::get("fake_bet_count_{$issueInfo->issue_no}", 0);
|
|
@@ -458,7 +486,6 @@ class BetService extends BaseService
|
|
|
$inlineButton = self::getOperateButton();
|
|
$inlineButton = self::getOperateButton();
|
|
|
|
|
|
|
|
// 群通知
|
|
// 群通知
|
|
|
- // self::bettingGroupNotice($groupText, $inlineButton); // 群通知
|
|
|
|
|
self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -838,168 +865,6 @@ class BetService extends BaseService
|
|
|
self::lotteryNotice($openList, $issue_no, $keywordsList);
|
|
self::lotteryNotice($openList, $issue_no, $keywordsList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * @description: 中奖结算
|
|
|
|
|
- * @param {*} $issue_no
|
|
|
|
|
- * @param {*} $awards
|
|
|
|
|
- * @return {*}
|
|
|
|
|
- */
|
|
|
|
|
- public static function betSettled2($issue_no, $awards)
|
|
|
|
|
- {
|
|
|
|
|
- $list = self::findAll(['issue_no' => $issue_no, 'status' => self::model()::STATUS_STAY]);
|
|
|
|
|
-
|
|
|
|
|
- $data = [];
|
|
|
|
|
- $text = $issue_no . "期开奖结果 \n";
|
|
|
|
|
- $text .= "-----本期开奖账单----- \n";
|
|
|
|
|
- // $text .=" 中奖类型 用户 投注金额 中奖金额 盈亏 \n";
|
|
|
|
|
- $text .= "\n";
|
|
|
|
|
- $betNoticeNum = Config::where('field', 'bet_notice_num')->first()->val;
|
|
|
|
|
- $betNoticeNum = explode(',', $betNoticeNum);
|
|
|
|
|
- $betNoticeMini = $betNoticeNum[0] ?? 26;
|
|
|
|
|
- $betNoticeMax = $betNoticeNum[1] ?? 38;
|
|
|
|
|
- $noticeNum = rand($betNoticeMini, $betNoticeMax);
|
|
|
|
|
-
|
|
|
|
|
- $realNoticeNum = ceil($noticeNum / 2);
|
|
|
|
|
- $openList = [];
|
|
|
|
|
- $bet_num = 0;
|
|
|
|
|
- foreach ($list->toArray() as $k => $v) {
|
|
|
|
|
- // $userInfo = UserService::findAll(['member_id' => $v['member_id']]);
|
|
|
|
|
- // $lastStr = self::getLastChar($userInfo->first_name, 1);
|
|
|
|
|
- $lastStr = self::hideMiddleDigits($v['member_id'], 4);
|
|
|
|
|
- $item = [];
|
|
|
|
|
- $item['id'] = $v['id'];
|
|
|
|
|
- $item['status'] = self::model()::STATUS_SETTLED;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (in_array($v['keywords'], $awards)) {
|
|
|
|
|
- // $profit = $v['amount'] * $v['odds'];
|
|
|
|
|
- $amount = $v['amount'];
|
|
|
|
|
- // $amount = rtrim($amount, '0'); // 去掉右侧的 0
|
|
|
|
|
- // $amount = rtrim($amount, '.'); // 如果末尾是 . 就去掉
|
|
|
|
|
- $odds = $v['odds'];
|
|
|
|
|
- $profit = bcmul($amount, $odds, 2); // 保留两位小数
|
|
|
|
|
- if ($profit > 880000) {
|
|
|
|
|
- $profit = 880000; // 单注最高奖金880000
|
|
|
|
|
- }
|
|
|
|
|
- $item['profit'] = $profit;
|
|
|
|
|
-
|
|
|
|
|
- // $yl = $profit - $amount;
|
|
|
|
|
- $yl = bcsub($profit, $amount, 2); // 盈利
|
|
|
|
|
- // if ($k + 1 <= $realNoticeNum) {
|
|
|
|
|
-
|
|
|
|
|
- // // $text .= "会员下注 【" . $lastStr . "】{$v['amount']} {$profit} {$yl}\n";
|
|
|
|
|
- // $bet_num++;
|
|
|
|
|
- // }
|
|
|
|
|
- // 结算
|
|
|
|
|
- // WalletService::updateBalance($v['member_id'], $profit);
|
|
|
|
|
-
|
|
|
|
|
- // $walletInfo = WalletService::findOne(['member_id' => $v['member_id']]);
|
|
|
|
|
- // $balance = $walletInfo['available_balance'];
|
|
|
|
|
-
|
|
|
|
|
- // BalanceLogService::addLog($v['member_id'], $profit, $balance, ($balance + $profit), '中奖', $v['id'], '');
|
|
|
|
|
-
|
|
|
|
|
- if (isset($openList[$v['member_id']])) {
|
|
|
|
|
- $openList[$v['member_id']]['member_id'] = $v['member_id'];
|
|
|
|
|
- $openList[$v['member_id']]['amount'] += $v['amount'];
|
|
|
|
|
- $openList[$v['member_id']]['profit'] += $profit;
|
|
|
|
|
- $openList[$v['member_id']]['lastStr'] = $lastStr;
|
|
|
|
|
- $openList[$v['member_id']]['openKeywords'][] = $v['keywords'];
|
|
|
|
|
- $openList[$v['member_id']]['keywords'][] = $v['keywords'];
|
|
|
|
|
- $openList[$v['member_id']]['win_amount'] += $v['amount'];
|
|
|
|
|
-
|
|
|
|
|
- } else {
|
|
|
|
|
- $openList[$v['member_id']]['member_id'] = $v['member_id'];
|
|
|
|
|
- $openList[$v['member_id']]['amount'] = $v['amount'];
|
|
|
|
|
- $openList[$v['member_id']]['profit'] = $profit;
|
|
|
|
|
- $openList[$v['member_id']]['lastStr'] = $lastStr;
|
|
|
|
|
- $openList[$v['member_id']]['openKeywords'] = [];
|
|
|
|
|
- $openList[$v['member_id']]['keywords'] = [];
|
|
|
|
|
- $openList[$v['member_id']]['openKeywords'][] = $v['keywords'];
|
|
|
|
|
- $openList[$v['member_id']]['keywords'][] = $v['keywords'];
|
|
|
|
|
- $openList[$v['member_id']]['win_amount'] = $v['amount'];
|
|
|
|
|
- $openList[$v['member_id']]['is_send'] = true;
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
-
|
|
|
|
|
- if (isset($openList[$v['member_id']])) {
|
|
|
|
|
- $openList[$v['member_id']]['member_id'] = $v['member_id'];
|
|
|
|
|
- $openList[$v['member_id']]['amount'] += $v['amount'];
|
|
|
|
|
- $openList[$v['member_id']]['lastStr'] = $lastStr;
|
|
|
|
|
- $openList[$v['member_id']]['keywords'][] = $v['keywords'];
|
|
|
|
|
- } else {
|
|
|
|
|
- $openList[$v['member_id']]['member_id'] = $v['member_id'];
|
|
|
|
|
- $openList[$v['member_id']]['amount'] = $v['amount'];
|
|
|
|
|
- $openList[$v['member_id']]['profit'] = 0;
|
|
|
|
|
- $openList[$v['member_id']]['lastStr'] = $lastStr;
|
|
|
|
|
- $openList[$v['member_id']]['openKeywords'] = [];
|
|
|
|
|
- $openList[$v['member_id']]['keywords'] = [];
|
|
|
|
|
- $openList[$v['member_id']]['keywords'][] = $v['keywords'];
|
|
|
|
|
- $openList[$v['member_id']]['win_amount'] = 0;
|
|
|
|
|
- $openList[$v['member_id']]['is_send'] = true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // if ($k + 1 <= $realNoticeNum) {
|
|
|
|
|
- // // $text .= "会员下注 【" . $lastStr . "】{$v['amount']} {$v['profit']} -{$v['amount']}\n";
|
|
|
|
|
- // $bet_num++;
|
|
|
|
|
- // }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // self::model()::where('id', $v['id'])->update($item);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // foreach($openList as $k => $v){
|
|
|
|
|
- // $amount = $v['amount'];
|
|
|
|
|
- // // if($v['profit'] >= 0){
|
|
|
|
|
- // $profit = number_format($v['profit'],2);
|
|
|
|
|
- // $yl = bcsub($v['profit'], $v['amount'], 2); // 盈利
|
|
|
|
|
- // // $text .= "会员下注 【" . $v['lastStr'] . "】 {$amount} {$profit} {$yl}\n";
|
|
|
|
|
- // if(++$bet_num <= $realNoticeNum){
|
|
|
|
|
- // $text .= "用户ID:{$v['lastStr']} \n";
|
|
|
|
|
- // $text .= "下注类型:[".implode(',', $v['keywords'])."] \n";
|
|
|
|
|
- // $text .= "中奖类型:[".implode(',', $v['openKeywords'])."] \n";
|
|
|
|
|
- // $text .= "投注金额:{$amount} \n";
|
|
|
|
|
- // $text .= "中奖金额:{$v['win_amount']} \n";
|
|
|
|
|
- // $text .= "派彩金额:{$profit} \n";
|
|
|
|
|
- // $text .= "盈亏金额:{$yl} \n";
|
|
|
|
|
- // $text .= "-------------------------------- \n";
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // $text2 = "{$issue_no}期开奖结果 \n";
|
|
|
|
|
- // $text2 .= "下注类型:[".implode(',', $v['keywords'])."] \n";
|
|
|
|
|
- // $text2 .= "中奖类型:[".implode(',', $v['openKeywords'])."] \n";
|
|
|
|
|
- // $text2 .= "投注金额:{$amount} \n";
|
|
|
|
|
- // $text2 .= "中奖金额:{$v['win_amount']} \n";
|
|
|
|
|
- // $text2 .= "派彩金额:{$profit} \n";
|
|
|
|
|
- // $text2 .= "盈亏金额:{$yl} \n";
|
|
|
|
|
- // $keyboard = [];
|
|
|
|
|
- // $keyboard[] = [
|
|
|
|
|
- // ['text' => "开奖历史", 'callback_data' => "showLotteryHistory@@" . $issue_no]
|
|
|
|
|
- // ];
|
|
|
|
|
- // // SendTelegramMessageJob::dispatch($v['member_id'],$text2);
|
|
|
|
|
- // self::sendMessage($v['member_id'],$text2,$keyboard);
|
|
|
|
|
- // // }else{
|
|
|
|
|
- // // $text .= "会员下注 【" . $v['lastStr'] . "】 {$amount} 0 -{$amount}\n";
|
|
|
|
|
- // // }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
- $inlineButton = self::getOperateButton();
|
|
|
|
|
-
|
|
|
|
|
- $rand_num = $noticeNum - $bet_num;
|
|
|
|
|
- $fakeOpenData = self::fakeLotteryDraw($issue_no, $awards, $rand_num);
|
|
|
|
|
- $openList = array_merge($openList, $fakeOpenData['list']);
|
|
|
|
|
-
|
|
|
|
|
- // 群通知
|
|
|
|
|
- // self::bettingGroupNotice($text, $inlineButton, '');
|
|
|
|
|
- // SendTelegramGroupMessageJob::dispatch($text,$inlineButton,'');
|
|
|
|
|
- self::lotteryNotice($openList, $issue_no);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 虚拟开奖
|
|
// 虚拟开奖
|
|
|
public static function fakeLotteryDraw($issue_no, $awards, $rand_num = 30)
|
|
public static function fakeLotteryDraw($issue_no, $awards, $rand_num = 30)
|
|
|
{
|
|
{
|
|
@@ -1095,9 +960,12 @@ class BetService extends BaseService
|
|
|
// shuffle($openList);
|
|
// shuffle($openList);
|
|
|
// Log::error('lotteryNotice openList', $openList);
|
|
// Log::error('lotteryNotice openList', $openList);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- $text = "{$issue_no}期开奖结果";
|
|
|
|
|
- $text .= "\n-----本期开奖账单----- \n";
|
|
|
|
|
|
|
+ $lang = App::getLocale();
|
|
|
|
|
+ $group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
|
|
+ App::setLocale($group_language);
|
|
|
|
|
+ $text = "{$issue_no}" . lang("期开奖结果");
|
|
|
|
|
+ $text .= "\n-----" . lang("本期开奖账单") . "----- \n";
|
|
|
|
|
+ App::setLocale($lang);
|
|
|
foreach ($openList as $k => $v) {
|
|
foreach ($openList as $k => $v) {
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1113,14 +981,18 @@ class BetService extends BaseService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (($k + 1) <= $noticeNum) {
|
|
if (($k + 1) <= $noticeNum) {
|
|
|
- $text .= "用户ID:{$v['lastStr']} \n";
|
|
|
|
|
- $text .= "下注类型:[" . implode(',', $v['keywords']) . "] \n";
|
|
|
|
|
- $text .= "中奖类型:[" . $openKeyword . "] \n";
|
|
|
|
|
- $text .= "投注金额:{$amount} \n";
|
|
|
|
|
- $text .= "中奖金额:{$v['win_amount']} \n";
|
|
|
|
|
- $text .= "派彩金额:{$profit} \n";
|
|
|
|
|
- $text .= "盈亏金额:{$yl} \n";
|
|
|
|
|
|
|
+ $lang = App::getLocale();
|
|
|
|
|
+ $group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
|
|
+ App::setLocale($group_language);
|
|
|
|
|
+ $text .= lang("用户ID") . ":{$v['lastStr']} \n";
|
|
|
|
|
+ $text .= lang("下注类型") . ":[" . implode(',', $v['keywords']) . "] \n";
|
|
|
|
|
+ $text .= lang('中奖类型') . ":[" . $openKeyword . "] \n";
|
|
|
|
|
+ $text .= lang('投注金额') . ":{$amount} \n";
|
|
|
|
|
+ $text .= lang('中奖金额') . ":{$v['win_amount']} \n";
|
|
|
|
|
+ $text .= lang('派彩金额') . ":{$profit} \n";
|
|
|
|
|
+ $text .= lang("盈亏金额") . ":{$yl} \n";
|
|
|
$text .= "-------------------------------- \n";
|
|
$text .= "-------------------------------- \n";
|
|
|
|
|
+ App::setLocale($lang);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($v['is_send']) {
|
|
if ($v['is_send']) {
|
|
@@ -1146,21 +1018,11 @@ class BetService extends BaseService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$inlineButton = self::getOperateButton();
|
|
$inlineButton = self::getOperateButton();
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 群通知
|
|
// 群通知
|
|
|
- // self::bettingGroupNotice($text, $inlineButton, '');
|
|
|
|
|
-
|
|
|
|
|
- // Log::error('lotteryNotice Group:'.$text);
|
|
|
|
|
-
|
|
|
|
|
-// $pos = strrpos($text, '--------------------------------');
|
|
|
|
|
-//
|
|
|
|
|
-// if ($pos !== false) {
|
|
|
|
|
-// // 使用 substr_replace 来删除最后一个 "ne"
|
|
|
|
|
-// $text = substr_replace($text, "", $pos, strlen('--------------------------------'));
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
- SendTelegramGroupMessageJob::dispatch($text, $inlineButton, '', false, '--------------------------------');
|
|
|
|
|
|
|
+ $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
|
|
+ if (($pc28Switch == 0 && is_numeric($issue_no)) || $pc28Switch == 1 && !is_numeric($issue_no)) {
|
|
|
|
|
+ SendTelegramGroupMessageJob::dispatch($text, $inlineButton, '', false, '--------------------------------');
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1192,20 +1054,21 @@ class BetService extends BaseService
|
|
|
$keywordsList[$v['keywords']] = $v['amount'];
|
|
$keywordsList[$v['keywords']] = $v['amount'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- $text3 = "📝 {$issue_no}期投注统计 \n";
|
|
|
|
|
- $text3 .= "玩法 总投 \n";
|
|
|
|
|
|
|
+ $lang = App::getLocale();
|
|
|
|
|
+ $group_language = Config::where('field', 'group_language')->first()->val;
|
|
|
|
|
+ App::setLocale($group_language);
|
|
|
|
|
+ $text3 = "📝 {$issue_no}" . lang('期投注统计') . " \n";
|
|
|
|
|
+ $text3 .= lang("玩法") . " " . lang("总投") . " \n";
|
|
|
|
|
|
|
|
if ($keywordsList) {
|
|
if ($keywordsList) {
|
|
|
ksort($keywordsList);
|
|
ksort($keywordsList);
|
|
|
foreach ($keywordsList as $k => $v) {
|
|
foreach ($keywordsList as $k => $v) {
|
|
|
$text3 .= "{$k} {$v} \n";
|
|
$text3 .= "{$k} {$v} \n";
|
|
|
- // $text3 .= "玩法:{$k} \n";
|
|
|
|
|
- // $text3 .= "总注:{$v} \n";
|
|
|
|
|
- // $text3 .= "-------------- \n";
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ App::setLocale($lang);
|
|
|
$inlineButton = self::getOperateButton();
|
|
$inlineButton = self::getOperateButton();
|
|
|
|
|
+
|
|
|
SendTelegramGroupMessageJob::dispatch($text3, $inlineButton, '');
|
|
SendTelegramGroupMessageJob::dispatch($text3, $inlineButton, '');
|
|
|
}
|
|
}
|
|
|
|
|
|