|
@@ -617,4 +617,17 @@ class IssueService extends BaseService
|
|
|
// $oldList = self::findAll(['status' => self::model()::STATUS_CLOSE]); // 获取所有封盘的期号
|
|
|
return $result;
|
|
|
}
|
|
|
+
|
|
|
+ // 停止下注
|
|
|
+ public static function syncCloseIssue()
|
|
|
+ {
|
|
|
+
|
|
|
+ $list = self::model()::where('status', self::model()::STATUS_BETTING)
|
|
|
+ ->where('end_time', '<', date('Y-m-d H:i:s',time() + 20)) // 提前20秒
|
|
|
+ ->get();
|
|
|
+
|
|
|
+ foreach($list as $k => $v){
|
|
|
+ self::closeBetting($v->id);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|