|
|
@@ -188,14 +188,9 @@ class BetService extends BaseService
|
|
|
$text = lang('下注期数') . ":{issue_no}\n";
|
|
|
$text .= lang("下注内容") . "\n";
|
|
|
$text .= "--------\n";
|
|
|
- $errText = "";
|
|
|
$success = false;
|
|
|
$sumAmount = 0;
|
|
|
- $groupTexts = [];
|
|
|
-
|
|
|
- $groupText = "";
|
|
|
-
|
|
|
-
|
|
|
+ $errText = $groupText = "";
|
|
|
foreach ($betResult as $index => $item) {
|
|
|
$keywords = $item['rule'];
|
|
|
$amount = $item['amount'];
|
|
|
@@ -211,28 +206,26 @@ class BetService extends BaseService
|
|
|
$errText .= "\n";
|
|
|
}
|
|
|
}
|
|
|
- $sumAmount = number_format($sumAmount, 2);
|
|
|
- $text .= "--------\n";
|
|
|
- $text .= lang("合计金额") . ":{$sumAmount}\n";
|
|
|
- $text .= lang("下注成功");
|
|
|
+
|
|
|
if (!$success) {
|
|
|
$msg['text'] = $errText;
|
|
|
if ($messageId) {
|
|
|
$msg['reply_to_message_id'] = $messageId;
|
|
|
}
|
|
|
} else {
|
|
|
+ $sumAmount = number_format($sumAmount, 2);
|
|
|
+ $text .= "--------\n";
|
|
|
+ $text .= lang("合计金额") . ":{$sumAmount}\n";
|
|
|
+ $text .= lang("下注成功");
|
|
|
$msg['text'] = $text;
|
|
|
$msg['text'] .= "\n";
|
|
|
if (!empty($errText)) {
|
|
|
$msg['text'] .= "------------------------\n";
|
|
|
$msg['text'] .= $errText;
|
|
|
}
|
|
|
+ $groupText .= "\n--------\n";
|
|
|
+ self::asyncBettingGroupNotice($groupText, self::getOperateButton()); // 异步群通知
|
|
|
}
|
|
|
-
|
|
|
- // 群通知
|
|
|
- $inlineButton = self::getOperateButton();
|
|
|
- $groupText .= "\n--------\n";
|
|
|
- self::asyncBettingGroupNotice($groupText, $inlineButton); // 异步群通知
|
|
|
DB::commit();
|
|
|
} catch (Exception $e) {
|
|
|
DB::rollBack();
|