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('该会长已经设定限制规则,请前往更新');