更新申请商家入驻

This commit is contained in:
yaooo 2023-08-22 09:55:37 +08:00
parent 1047347491
commit b2523aaab6
2 changed files with 4 additions and 2 deletions

View File

@ -44,6 +44,8 @@ class MerchantIntention extends BaseController
return app('json')->fail('未开启商户入驻'); return app('json')->fail('未开启商户入驻');
} }
if ($this->userInfo) $data['uid'] = $this->userInfo->uid; if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
if ($this->userInfo->account == $data['phone'])
throw new ValidateException('手机号账户已存在,不可申请');
$make = app()->make(MerchantRepository::class); $make = app()->make(MerchantRepository::class);
if ($make->fieldExists('mer_name', $data['mer_name'])) if ($make->fieldExists('mer_name', $data['mer_name']))
throw new ValidateException('商户名称已存在,不可申请'); throw new ValidateException('商户名称已存在,不可申请');