更新委托判断

This commit is contained in:
yaooo 2023-09-08 16:15:14 +08:00
parent c5918d8acb
commit 30d71babd4

View File

@ -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']);