2 次代碼提交 f292c42b9c ... f48fbdb280

作者 SHA1 備註 提交日期
  ssvfdn f48fbdb280 Merge remote-tracking branch 'origin/main' 3 月之前
  ssvfdn 3f3bd9db0f fix 3 月之前
共有 2 個文件被更改,包括 16 次插入0 次删除
  1. 14 0
      app/controller/GameImproveRtpGlobal.php
  2. 2 0
      app/model/GameImproveRtpGlobalModel.php

+ 14 - 0
app/controller/GameImproveRtpGlobal.php

@@ -78,6 +78,20 @@ class GameImproveRtpGlobal extends BaseController
             $info->custom_time_start = !empty($custom_time_start) ?  strtotime($custom_time_start) : 0;
             $info->custom_time_end = !empty($custom_time_end) ?  strtotime($custom_time_end) : 0;
 
+
+            if($info->evaluation_period != 5) {
+                $info->round_status = 1;
+                $info->open_status_time = time();
+            }else {
+                if(time() >= $info->custom_time_start) {
+                    $info->round_status = 1;
+                }
+                if(time() >= $info->custom_time_end) {
+                    $info->round_status = 2;
+                }
+                $info->open_status_time = $info->custom_time_start;
+            }
+
             $info->save();
 
             return json_success([],'操作成功');

+ 2 - 0
app/model/GameImproveRtpGlobalModel.php

@@ -31,6 +31,7 @@ class GameImproveRtpGlobalModel extends Model
         'status' => 'int', // 状态 1 正常,0 取消
         'create_time' => 'int',
         'update_time' => 'int',
+        'open_status_time' => 'int',
     ];
 
     public static function initCreateGlobal($app_id) {
@@ -44,6 +45,7 @@ class GameImproveRtpGlobalModel extends Model
             'turnover_multiple' => 5,
             'custom_time_start' => 0,
             'custom_time_end' => 0,
+            'open_status_time' => time()
         ]);
     }