|
|
@@ -189,11 +189,12 @@ class BetService extends BaseService
|
|
|
$errText = "";
|
|
|
$success = false;
|
|
|
$sumAmount = 0;
|
|
|
+ $groupTexts = [];
|
|
|
foreach ($betResult as $item) {
|
|
|
$keywords = $item['rule'];
|
|
|
$amount = $item['amount'];
|
|
|
$error = $issueNo = "";
|
|
|
- $b = static::singleNote($memberId, $keywords, $amount, $issueNo, $text, $error);
|
|
|
+ $b = static::singleNote($memberId, $keywords, $amount, $issueNo, $text, $error, $groupTexts);
|
|
|
if ($b) {
|
|
|
$sumAmount += $amount;
|
|
|
$text = str_replace("{issue_no}", $issueNo, $text);
|
|
|
@@ -221,6 +222,16 @@ class BetService extends BaseService
|
|
|
$msg['text'] .= $errText;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 群通知
|
|
|
+ $inlineButton = self::getOperateButton();
|
|
|
+ foreach ($groupTexts as $item) {
|
|
|
+ sleep(1);
|
|
|
+ self::asyncBettingGroupNotice($item, $inlineButton); // 异步群通知
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
DB::commit();
|
|
|
} catch (Exception $e) {
|
|
|
DB::rollBack();
|
|
|
@@ -232,7 +243,7 @@ class BetService extends BaseService
|
|
|
return $msg;
|
|
|
}
|
|
|
|
|
|
- private static function singleNote($memberId, $keywords, $amount, &$issueNo, &$text, &$errText): bool
|
|
|
+ private static function singleNote($memberId, $keywords, $amount, &$issueNo, &$text, &$errText, &$groupTexts): bool
|
|
|
{
|
|
|
$errText .= "【{$keywords}{$amount}】\n";
|
|
|
//客服号
|
|
|
@@ -365,15 +376,16 @@ class BetService extends BaseService
|
|
|
$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";
|
|
|
App::setLocale($lang);
|
|
|
|
|
|
- $inlineButton = self::getOperateButton();
|
|
|
+// $inlineButton = self::getOperateButton();
|
|
|
|
|
|
// 群通知
|
|
|
- self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
|
+// self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -427,7 +439,7 @@ class BetService extends BaseService
|
|
|
$gameplayRuleList = $gameplayRuleList->toArray();
|
|
|
$member_id = self::generateRandomNumber(10);
|
|
|
$betTimes = rand(1, $betNumber); // 每次下注次数
|
|
|
- Cache::add("封盘后下注单数_{$issueInfo->issue_no}", rand(3, 5),4);
|
|
|
+ Cache::add("封盘后下注单数_{$issueInfo->issue_no}", rand(3, 5), 4);
|
|
|
for ($i = 0; $i < $betTimes; $i++) {
|
|
|
|
|
|
if (strtotime($issueInfo['end_time']) - time() < IssueService::COUNTDOWN_TO_CLOSING_THE_MARKET) {
|