|
|
@@ -54,14 +54,6 @@ class ApplyController extends BaseController
|
|
|
$get['userId'] = $this->userId;
|
|
|
$get['long'] = isset($get['longitude']) ? $get['longitude'] : '';
|
|
|
$get['lat'] = isset($get['latitude']) ? $get['latitude'] : '';
|
|
|
- $apply = ApplyClass::getByCondition(['userId' => $this->userId]);
|
|
|
- if (!empty($apply)) {
|
|
|
- util::fail('您已经申请过了');
|
|
|
- }
|
|
|
- $admin = AdminService::getByCondition(['platUserId' => $this->userId]);
|
|
|
- if (!empty($admin)) {
|
|
|
- util::fail('您已经开店了,不能重复申请');
|
|
|
- }
|
|
|
|
|
|
$cacheKey = 'OPEN_SHOP_APPLY_' . $userId;
|
|
|
$cacheCode = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
@@ -72,6 +64,15 @@ class ApplyController extends BaseController
|
|
|
util::fail('验证码错误');
|
|
|
}
|
|
|
|
|
|
+ $apply = ApplyClass::getByCondition(['userId' => $this->userId]);
|
|
|
+ if (!empty($apply)) {
|
|
|
+ util::fail('您已经申请过了');
|
|
|
+ }
|
|
|
+ $admin = AdminService::getByCondition(['platUserId' => $this->userId]);
|
|
|
+ if (!empty($admin)) {
|
|
|
+ util::fail('您已经开店了,不能重复申请');
|
|
|
+ }
|
|
|
+
|
|
|
ApplyService::addApply($get);
|
|
|
if ($rand == 0) {
|
|
|
$data = ['focus' => 0, 'qrCode' => 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3602624501,870193918&fm=26&gp=0.jpg'];
|