Pārlūkot izejas kodu

feat: NG-71: 移除皇冠星级相关配置及代码

kevin 1 gadu atpakaļ
vecāks
revīzija
b6f4d9570b

+ 0 - 1
backendApi/modules/v1/models/lists/user/IndexList.php

@@ -206,7 +206,6 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                         'width' => '190',
                     ],
                     'value' => function($row) use($eliteLevelConfig) {
-                        LoggerTool::debug(['$eliteLevelConfig', $eliteLevelConfig]);
                         return $eliteLevelConfig[$row['ELITE_LV']]['LEVEL_NAME'] ?? $eliteLevelConfig[EliteLevel::getDefaultLevelId()]['LEVEL_NAME'];
                     },
                     'valueOther' => [

+ 3 - 2
common/models/EliteLevel.php

@@ -34,7 +34,7 @@ class EliteLevel extends \common\components\ActiveRecord
      */
     public static function tableName()
     {
-        return '{{%CROWN_LEVEL}}';
+        return '{{%ELITE_LEVEL}}';
     }
 
     /**
@@ -90,7 +90,7 @@ class EliteLevel extends \common\components\ActiveRecord
     public static function getIdConvertLevelSort()
     {
         $ret = [];
-        $allData = static::find()->where('1=1')->orderBy('SORT ASC, CREATED_AT ASC')->indexBy('ID')->asArray()->all();
+        $allData = static::getAllData();
         foreach($allData as $data) {
             $ret[$data['ID']] = $data['SORT'];
         }
@@ -121,6 +121,7 @@ class EliteLevel extends \common\components\ActiveRecord
     public static function getFromCache()
     {
         $data = Yii::$app->cache->get(Cache::ELITE_LEVEL_CONFIG_KEY);
+        Yii::$app->cache->delete(Cache::ELITE_LEVEL_CONFIG_KEY);
         if(!$data){
             // 获取信息
             $data = self::getAllData();