新增商户审核发布申请
This commit is contained in:
parent
cd5932e051
commit
51b5bd91f3
@ -45,14 +45,18 @@ 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;
|
||||||
$newUid = Db::name('User')->where('account', $data['phone'])->value('uid', -1);
|
$merInfo = Db::name('merchant')->where('uid', $this->userInfo->uid)->where('status', 1)->find();
|
||||||
if ($newUid != -1 && $this->userInfo->uid != $newUid) {
|
if ($merInfo) {
|
||||||
//throw new ValidateException('该申请手机已存在账户,不可申请');
|
throw new ValidateException('该用户已存在商户,不可申请');
|
||||||
}
|
|
||||||
$newMerid = Db::name('Merchant')->where('mer_phone', $data['phone'])->value('mer_id', -1);
|
|
||||||
if ($newMerid != -1) {
|
|
||||||
//throw new ValidateException('该申请手机已存在商户,不可申请');
|
|
||||||
}
|
}
|
||||||
|
// $newUid = Db::name('User')->where('account', $data['phone'])->value('uid', -1);
|
||||||
|
// if ($newUid != -1 && $this->userInfo->uid != $newUid) {
|
||||||
|
// //throw new ValidateException('该申请手机已存在账户,不可申请');
|
||||||
|
// }
|
||||||
|
// $newMerid = Db::name('Merchant')->where('mer_phone', $data['phone'])->value('mer_id', -1);
|
||||||
|
// if ($newMerid != -1) {
|
||||||
|
// //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('商户名称已存在,不可申请');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user