Ken 6 روز پیش
والد
کامیت
fa53a5c34f
1فایلهای تغییر یافته به همراه12 افزوده شده و 9 حذف شده
  1. 12 9
      app/Services/IssueService.php

+ 12 - 9
app/Services/IssueService.php

@@ -210,15 +210,18 @@ class IssueService extends BaseService
         $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
         $info->status = self::model()::STATUS_CLOSE;
         $info->save();
-        $replyInfo = KeyboardService::findOne(['button' => '停止下注']);
-        if ($replyInfo) {
-            $text = $replyInfo->reply;
-            $buttons = json_decode($replyInfo->buttons, true);
-            $image = $replyInfo->image;
-            if ($image) {
-                $image = url($image);
+        if ($pc28Switch == 0) {
+            $replyInfo = KeyboardService::findOne(['button' => '停止下注']);
+            if ($replyInfo) {
+                $text = $replyInfo->reply;
+                $buttons = json_decode($replyInfo->buttons, true);
+                $image = $replyInfo->image;
+                if ($image) {
+                    $image = url($image);
+                }
+                //停止下注的信息不发了
+//                self::asyncBettingGroupNotice($text, $buttons, $image);
             }
-            if ($pc28Switch == 0) self::asyncBettingGroupNotice($text, $buttons, $image);
         }
 
         // 投注情况通知
@@ -980,7 +983,7 @@ class IssueService extends BaseService
 
                     } else {
                         $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
-                        if ($pc28Switch == 0){
+                        if ($pc28Switch == 0) {
                             self::asyncBettingGroupNotice($text, $buttons, $image);
                             Cache::put('issue_countdown_' . $info->issue_no, true, 60); // 缓存50秒,防止多次发送
                         }