Ken 1 gün önce
ebeveyn
işleme
a696ff759e

+ 10 - 0
app/Models/Config.php

@@ -2,10 +2,13 @@
 
 namespace App\Models;
 
+use Illuminate\Support\Facades\Cache;
+
 class Config extends BaseModel
 {
     protected $table = 'config';
     protected $fillable = ['field', 'val', 'remark', 'group_id'];
+
     /*
      * group_id
      * 1 系统基础配置
@@ -15,4 +18,11 @@ class Config extends BaseModel
      *
      *
      */
+
+    public static function setPc28Switch()
+    {
+        $pc28_switch = Cache::get('pc28_switch');
+        static::where('field', 'pc28_switch')->update(['val' => $pc28_switch]);
+
+    }
 }

+ 3 - 0
app/Services/IssueService.php

@@ -352,6 +352,9 @@ class IssueService extends BaseService
 
             BetService::betSettled($info->issue_no, $awards);
 
+            //更新游戏开关的切换
+            Config::setPc28Switch();
+
 
             DB::commit();
             return ['code' => self::YES, 'msg' => '开奖成功'];

+ 2 - 0
app/Services/PcIssueService.php

@@ -183,6 +183,8 @@ class PcIssueService extends BaseService
                 SendTelegramGroupMessageJob::dispatch('', [], url($recordImage), false);
             }
             BetService::betSettled($info->issue_no, $awards);
+            //更新游戏开关的切换
+            Config::setPc28Switch();
             DB::commit();
             return ['code' => self::YES, 'msg' => '开奖成功'];
         } catch (\Exception $e) {