|
|
@@ -191,11 +191,18 @@ class BetService extends BaseService
|
|
|
$success = false;
|
|
|
$sumAmount = 0;
|
|
|
$groupTexts = [];
|
|
|
- foreach ($betResult as $item) {
|
|
|
+
|
|
|
+ $groupText = "";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ foreach ($betResult as $index =>$item) {
|
|
|
$keywords = $item['rule'];
|
|
|
$amount = $item['amount'];
|
|
|
$error = $issueNo = "";
|
|
|
- $b = static::singleNote($memberId, $keywords, $amount, $issueNo, $text, $error, $groupTexts);
|
|
|
+ $b = static::singleNote($memberId, $keywords, $amount, $issueNo, $text, $error, $groupText,$index);
|
|
|
if ($b) {
|
|
|
$sumAmount += $amount;
|
|
|
$text = str_replace("{issue_no}", $issueNo, $text);
|
|
|
@@ -226,12 +233,7 @@ class BetService extends BaseService
|
|
|
|
|
|
// 群通知
|
|
|
$inlineButton = self::getOperateButton();
|
|
|
- foreach ($groupTexts as $item) {
|
|
|
- usleep(100000); // 暂停 100 毫秒
|
|
|
- self::asyncBettingGroupNotice($item, $inlineButton); // 异步群通知
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
|
DB::commit();
|
|
|
} catch (Exception $e) {
|
|
|
DB::rollBack();
|
|
|
@@ -249,7 +251,7 @@ class BetService extends BaseService
|
|
|
return $msg;
|
|
|
}
|
|
|
|
|
|
- private static function singleNote($memberId, $keywords, $amount, &$issueNo, &$text, &$errText, &$groupTexts): bool
|
|
|
+ private static function singleNote($memberId, $keywords, $amount, &$issueNo, &$text, &$errText, &$groupText,$index): bool
|
|
|
{
|
|
|
$errText .= "【{$keywords}{$amount}】\n";
|
|
|
//客服号
|
|
|
@@ -379,13 +381,17 @@ class BetService extends BaseService
|
|
|
$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("下注内容") . ":{$keywords} {$amount} \n";
|
|
|
- $groupTexts[] = $groupText;
|
|
|
-// $groupText .= "----------- \n";
|
|
|
-// $groupText .= "{$keywords} {$amount} \n";
|
|
|
-// $groupText .= "----------- \n";
|
|
|
+ if($index ===0){
|
|
|
+ $groupText .= lang("第") . "{$issueNo}" . lang("期") . "\n";
|
|
|
+ $groupText .= lang("开奖时间") . ":" . date("H:i:s", strtotime($issueInfo['end_time'])) . "\n";
|
|
|
+ $groupText .= lang('投注截止') . ":" . date("H:i:s", (strtotime($issueInfo['end_time'])) - 30) . "\n";;
|
|
|
+ $groupText.=lang("成功")."\n";
|
|
|
+ $groupText .= lang('玩家') . ": 【{$lastStr}】 \n";
|
|
|
+ $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}".lang("倍率").") ";
|
|
|
+ }else{
|
|
|
+ $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}".lang("倍率").") ";
|
|
|
+ }
|
|
|
+
|
|
|
App::setLocale($lang);
|
|
|
|
|
|
// $inlineButton = self::getOperateButton();
|
|
|
@@ -497,7 +503,7 @@ class BetService extends BaseService
|
|
|
|
|
|
$fake_bet_list[] = $item;
|
|
|
|
|
|
- $groupText .= "{$input} ({$item['odds']}倍率) ";
|
|
|
+ $groupText .= "{$input} ({$item['odds']}".lang("倍率").") ";
|
|
|
|
|
|
|
|
|
if (strtotime($issueInfo['end_time']) - strtotime($now_date) < 22) {
|