|
|
|
@ -128,9 +128,9 @@ class User extends UserService |
|
|
|
|
*/ |
|
|
|
|
public static function isStore(): bool |
|
|
|
|
{ |
|
|
|
|
$userType = static::getCurrentLoginUserType(); |
|
|
|
|
if ($userType && $userType == UserTypeEnum::STORE) { |
|
|
|
|
$userId = self::getCurrentLoginUserId(); |
|
|
|
|
$userInfo = static::getCurrentLoginUser(true); |
|
|
|
|
if ($userInfo && $userInfo['user_type'] == UserTypeEnum::STORE) { |
|
|
|
|
$userId = $userInfo['user_id']; |
|
|
|
|
//商家表里有没有 |
|
|
|
|
$model = new \app\api\model\Store(); |
|
|
|
|
$store_id = $model->where(['user_id' => $userId])->value('store_id'); |
|
|
|
|