|
|
@@ -735,26 +735,29 @@ class IssueService extends BaseService
|
|
|
{
|
|
|
$now_date = date('Y-m-d H:i:s',time() + 50); // 提前50秒
|
|
|
$info = self::model()::where('status', self::model()::STATUS_BETTING)->orderBy('end_time','asc')->first();
|
|
|
- if($info['end_time'] < $now_date){
|
|
|
- $replyInfo = KeyboardService::findOne(['button' => '封盘倒数']);
|
|
|
- if($replyInfo){
|
|
|
-
|
|
|
- $text = $replyInfo->reply;
|
|
|
- $buttons = json_decode($replyInfo->buttons,true);
|
|
|
- $image = $replyInfo->image;
|
|
|
- if($image){
|
|
|
- $image = url($image);
|
|
|
- }
|
|
|
- if(Cache::has('issue_countdown_'.$info->id)){
|
|
|
+ if($info){
|
|
|
+ if($info['end_time'] < $now_date){
|
|
|
+ $replyInfo = KeyboardService::findOne(['button' => '封盘倒数']);
|
|
|
+ if($replyInfo){
|
|
|
+
|
|
|
+ $text = $replyInfo->reply;
|
|
|
+ $buttons = json_decode($replyInfo->buttons,true);
|
|
|
+ $image = $replyInfo->image;
|
|
|
+ if($image){
|
|
|
+ $image = url($image);
|
|
|
+ }
|
|
|
+ if(Cache::has('issue_countdown_'.$info->id)){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ self::bettingGroupNotice($text, $buttons, $image);
|
|
|
+ Cache::put('issue_countdown_'.$info->id, true, 60); // 缓存50秒,防止多次发送
|
|
|
+ }
|
|
|
|
|
|
- }else{
|
|
|
- self::bettingGroupNotice($text, $buttons, $image);
|
|
|
- Cache::put('issue_countdown_'.$info->id, true, 60); // 缓存50秒,防止多次发送
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 停止下注
|