2 Commits f292c42b9c ... f48fbdb280

Author SHA1 Message Date
  ssvfdn f48fbdb280 Merge remote-tracking branch 'origin/main' 3 months ago
  ssvfdn 3f3bd9db0f fix 3 months ago
2 changed files with 16 additions and 0 deletions
  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()
         ]);
     }