From 6b8e277fb1f1dba7509e47e958a8271b310f53f1 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 20 Dec 2019 14:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0>=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=98=E7=AE=A1=E7=90=86>=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E5=88=86=E6=88=90=E7=AE=A1=E7=90=86--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteGameRatioController.class.php | 5 +++++ 1 file changed, 5 insertions(+) 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;