diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 05bedf223..d8ea7d936 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -130,6 +130,11 @@ class PromoteGameRatioController extends ThinkController if (empty($params['begin_time'])) { $this->error('请选择开始时间'); } + if (!empty($params['end_time'])) { + if (strtotime($params['end_time']) < strtotime($params['begin_time'])) { + $this->error('结束时间不得小于开始时间'); + } + } $save['ratio'] = $params['ratio'] ?? 0; $save['begin_time'] = strtotime($params['begin_time']); $save['end_time'] = $params['end_time'] ? strtotime($params['end_time']) : 0;