Jelajahi Sumber

会员列表修改

kevin 1 tahun lalu
induk
melakukan
d0aa3e5c76
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      common/models/Countries.php

+ 3 - 3
common/models/Countries.php

@@ -65,7 +65,7 @@ class Countries extends \common\components\ActiveRecord
         $data = Yii::$app->cache->get(Cache::COUNTRIES_KEY);
         if (!$data) {
             // 获取信息
-            $data = static::find()->orderBy('ACTIVE DESC, ID ASC')->indexBy('ID')->asArray()->all();
+            $data = static::find()->orderBy('ACTIVE DESC, NAME ASC')->indexBy('ID')->asArray()->all();
             Yii::$app->cache->set(Cache::COUNTRIES_KEY, $data);
         }
 
@@ -77,7 +77,7 @@ class Countries extends \common\components\ActiveRecord
      */
     public static function getAllData()
     {
-        return static::find()->where('1=1')->indexBy('ID')->orderBy('ACTIVE DESC, ID ASC')->asArray()->all();
+        return static::find()->where('1=1')->indexBy('ID')->orderBy('ACTIVE DESC, NAME ASC')->asArray()->all();
     }
 
     /**
@@ -87,7 +87,7 @@ class Countries extends \common\components\ActiveRecord
     public static function updateToCache()
     {
         // 获取配置
-        $data = static::find()->where('1=1')->orderBy('ACTIVE DESC, ID ASC')->asArray()->indexBy('ID')->all();
+        $data = static::find()->where('1=1')->orderBy('ACTIVE DESC, NAME ASC')->asArray()->indexBy('ID')->all();
         Yii::$app->cache->set(Cache::COUNTRIES_KEY, $data);
         return $data;
     }