From 522f758bd5bdb4a6c72f1528b0221e8f74619a45 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 18 Jun 2020 09:44:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteLimitRuleController.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PromoteLimitRuleController.class.php b/Application/Admin/Controller/PromoteLimitRuleController.class.php index e66e408a3..839704544 100644 --- a/Application/Admin/Controller/PromoteLimitRuleController.class.php +++ b/Application/Admin/Controller/PromoteLimitRuleController.class.php @@ -122,10 +122,6 @@ class PromoteLimitRuleController extends ThinkController $startedAt = $startedAt === '' ? null : $startedAt; $endedAt = $endedAt === '' ? null : $endedAt; - if (empty($promoteId)) { - return $this->error('请选择会长'); - } - if ($startedAt && $endedAt && strtotime($startedAt) > strtotime($endedAt)) { return $this->error('开始时间不能大于结束时间'); } @@ -137,6 +133,9 @@ class PromoteLimitRuleController extends ThinkController return $this->error('修改记录不存在'); } } else { + if (empty($promoteId)) { + return $this->error('请选择会长'); + } $promoteRecord = M('promote_limit_rules', 'tab_')->where(['promote_id' => $promoteId])->find(); if ($promoteRecord) { return $this->error('该会长已经设定限制规则,请前往更新');