|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace biz\saas\classes;
|
|
|
|
|
|
+use biz\admin\classes\AdminShopClass;
|
|
|
use common\components\sms;
|
|
|
use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
@@ -21,11 +22,15 @@ class ApplyClass extends BaseClass
|
|
|
}
|
|
|
$apply = self::getByCondition(['mobile' => $mobile]);
|
|
|
if (!empty($apply)) {
|
|
|
- util::fail('您已经申请过了');
|
|
|
+ util::fail('手机号已被使用');
|
|
|
}
|
|
|
- $apply = self::getByCondition(['userId' => $data['userId']]);
|
|
|
+ $apply = self::getByCondition(['adminId' => $data['adminId']]);
|
|
|
if (!empty($apply)) {
|
|
|
- util::fail('您已经申请过了');
|
|
|
+ util::fail('您已申请过了');
|
|
|
+ }
|
|
|
+ $adminShop = AdminShopClass::getByCondition(['adminId' => $data['adminId']]);
|
|
|
+ if (!empty($adminShop)) {
|
|
|
+ util::fail('您已经有门店了');
|
|
|
}
|
|
|
$prefix = $data['province'] == $data['city'] ? $data['province'] : $data['province'] . $data['city'];
|
|
|
$dist = isset($data['dist']) ? $data['dist'] : '';
|