瀏覽代碼

会员列表修改

kevin 1 年之前
父節點
當前提交
d0aa3e5c76
共有 1 個文件被更改,包括 3 次插入3 次删除
  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;
     }