ryan 1 неделя назад
Родитель
Сommit
55873f5050
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      frontendApi/modules/v1/controllers/ShopController.php

+ 3 - 3
frontendApi/modules/v1/controllers/ShopController.php

@@ -805,19 +805,19 @@ class ShopController extends BaseController {
             return static::notice('countryId is required', 400);
         }
 
-        $user = User::find()
+        $user_one = User::find()
             ->select('ID,USER_NAME')
             ->where(['COUNTRY_ID' => (int)$countryId, 'IS_DEC' => 1])
             ->orderBy(['USER_NAME' => SORT_ASC])
             ->asArray()
             ->one();
 
-        if (!$user) {
+        if (!$user_one) {
             return static::notice(Yii::t('app', 'stockistDoesNotExist'), 400);
         }
 
         // 会员信息
-        $user = User::findOneAsArray('ID=:ID', [':ID' => $user['ID']]);
+        $user = User::findOneAsArray('ID=:ID', [':ID' => $user_one['ID']]);
         if (!$user) {
             return static::notice(Yii::t('app', 'memberDoesNotExist'), 400);
         }