seven 3 napja
szülő
commit
304de7bf00

+ 3 - 5
app/Http/Controllers/api/TelegramWebHook.php

@@ -26,6 +26,7 @@ use Telegram\Bot\Exceptions\TelegramSDKException;
 use Illuminate\Support\Facades\Log;
 use App\Models\Config;
 use App\Services\GameplayRuleService;
+use App\Services\BetService;
 
 class TelegramWebHook extends Controller
 {
@@ -231,11 +232,8 @@ class TelegramWebHook extends Controller
                         break;
                     default:
 
-                        $gameplay = GameplayRuleService::bettingRuleVerify($text);
-                        $this->telegram->sendMessage([
-                            'chat_id' => $chatId,
-                            'text' => '‼️‼️未知命令,请点击下方菜单按钮选择功能'
-                        ]);
+                        $returnMsg = BetService::bet($chatId,$text);
+                        $this->telegram->sendMessage($returnMsg);
                 }
             }
         }

+ 8 - 0
app/Services/BetService.php

@@ -230,6 +230,14 @@ class BetService extends BaseService
         WalletService::updateBalance($memberId,-$amount);
 
         BalanceLogService::addLog($memberId,-$amount,$balance,($balance-$amount),'投注',$newBet->id,'');
+
+        $text = "下注期数:{$issueInfo->issue_no}\n";
+        $text .= "下注内容\n";
+        $text .= "--------\n";
+        $text .= "{$input}\n";
+        $text .= "--------\n";
+        $text .= "下注成功\n";
+
     }