Ken 2 天之前
父节点
当前提交
f17fb937c3

+ 18 - 0
app/Services/BetService.php

@@ -168,6 +168,18 @@ class BetService extends BaseService
         // 分解投注的内容
         $betResult = GameplayRuleService::bettingRuleVerify($input);
         $serviceAccount = Config::where('field', 'service_customer')->first()->val;
+
+        $maintenanceSwitch = Config::where('field', 'maintenance_switch')->first()->val;
+        if ($maintenanceSwitch != 0) {
+            $text = lang("系统维护中!") . "\n";
+            $text .= lang("任何疑问都可以联系唯一客服") . ":@{$serviceAccount}";
+            $msg['text'] = $text;
+            if ($messageId) {
+                $msg['reply_to_message_id'] = $messageId;
+            }
+            return $msg;
+        }
+
         if ($betResult == null) {
             $text = lang("消息格式错误!") . "\n";
             $text .= lang("任何疑问都可以联系唯一客服") . ":@{$serviceAccount}";
@@ -373,6 +385,12 @@ class BetService extends BaseService
         if ($cache) {
             return;
         }
+        $maintenanceSwitch = Config::where('field', 'maintenance_switch')->first()->val;
+        if ($maintenanceSwitch != 0) {
+            return;
+        }
+
+
         $betFake = Config::where('field', 'bet_fake')->first()->val;
         if ($betFake) {
             // 期数验证

+ 37 - 0
database/migrations/2025_12_05_172823_insert_config.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Support\Facades\DB;
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        DB::table('config')->insert([
+            [
+                'field' => 'maintenance_switch',
+                'val' => "1000",
+                'remark' => '维护开关',
+                'group_id' => 0,
+                'created_at' => now(),
+                'updated_at' => now(),
+            ]
+        ]);
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+    }
+};

+ 1 - 0
lang/en/messages.php

@@ -291,6 +291,7 @@ return [
     "管理员已将指定账户转移至您的账户" => "The administrator has transferred the specified account to your account",
     "原账户信息" => "Original Account Information",
     "比比返失败"=>"The water injection for the DSLR failed",
+    "系统维护中"=>"Under system maintenance",
     
 
 

+ 1 - 2
lang/vi/messages.php

@@ -285,14 +285,13 @@ return [
     "消息格式错误!" => "Định dạng tin nhắn sai!",
     "任何疑问都可以联系唯一客服" => "Mọi thắc mắc có thể liên hệ bộ phận chăm sóc khách hàng duy nhất",
     "🤖开始使用" => "🤖Bắt đầu sử dụng",
-    
     "账户转移通知" => "Thông báo chuyển tài khoản",
     "管理员已将您的账户转移至新用户" => "Quản trị viên đã chuyển tài khoản của bạn sang người dùng mới",
     "新用户信息" => "Thông tin người dùng mới",
     "管理员已将指定账户转移至您的账户" => "Quản trị viên đã chuyển tài khoản được chỉ định sang tài khoản của bạn",
     "原账户信息" => "Thông tin tài khoản cũ",
     "比比返失败"=>"Máy bơm nước SLR thất bại",
-
+    "系统维护中"=>"Bảo trì hệ thống",
 
 
 

+ 1 - 0
lang/zh/messages.php

@@ -291,6 +291,7 @@ return [
     "管理员已将指定账户转移至您的账户" => "管理员已将指定账户转移至您的账户",
     "原账户信息" => "原账户信息",
     "比比返失败"=>"比比返失败",
+    "系统维护中"=>"系统维护中",
 
 
 ];