|
|
@@ -36,23 +36,36 @@ class PcIssueService extends BaseService
|
|
|
->get();
|
|
|
$now = time();
|
|
|
$pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
- $replyInfo = KeyboardService::findOne(['button' => '停止下注']);
|
|
|
- if ($replyInfo) {
|
|
|
- $text = $replyInfo->reply;
|
|
|
- $buttons = json_decode($replyInfo->buttons, true);
|
|
|
- $image = $replyInfo->image;
|
|
|
- if ($image) {
|
|
|
- $image = url($image);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
foreach ($list as $index => $item) {
|
|
|
if (strtotime($item->end_time) - 30 <= $now) {
|
|
|
$item->status = PcIssue::STATUS_CLOSE;
|
|
|
$item->save();
|
|
|
- if ($replyInfo && $pc28Switch == 1 && $index == 0) self::asyncBettingGroupNotice($text, $buttons, $image);
|
|
|
- // 统计投注情况通知
|
|
|
- if ($pc28Switch == 1 && $index == 0) BetService::statNotice($item->issue_no);
|
|
|
+
|
|
|
+ if ($index == 0 && $pc28Switch == 1) {
|
|
|
+ $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);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 统计投注情况通知
|
|
|
+ BetService::statNotice($item->issue_no);
|
|
|
+ $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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|