From 30d71babd4f1ed7ceb91acafe00ef1968e40343e Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 8 Sep 2023 16:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A7=94=E6=89=98=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 376031c9..7b272b39 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -299,6 +299,11 @@ class Community extends BaseController if ($data['entrust_day'] < 15 || $data['entrust_day'] > 90) { throw new ValidateException('委托天数区间为[15-90]天'); } + $merchantId = Db::name('merchant')->where('uid', $this->request->uid())->value('mer_id'); + if ($data['entrust_mer_id'] == $merchantId) { + throw new ValidateException('不能委托自己'); + } + } $data['content'] = filter_emoji($data['content']);