|
|
@@ -62,7 +62,7 @@ class Currency extends \common\components\ActiveRecord
|
|
|
Yii::$app->cache->delete(Cache::CURRENCIES_KEY);
|
|
|
if (!$data) {
|
|
|
// 获取信息
|
|
|
- $data = static::find()->where('ACTIVE=1')->orderBy('ACTIVE DESC, ID ASC')->asArray()->all();
|
|
|
+ $data = self::getAllData();
|
|
|
Yii::$app->cache->set(Cache::CURRENCIES_KEY, $data);
|
|
|
}
|
|
|
|
|
|
@@ -84,7 +84,7 @@ class Currency extends \common\components\ActiveRecord
|
|
|
public static function updateToCache()
|
|
|
{
|
|
|
// 获取配置
|
|
|
- $data = static::find()->where('1=1')->orderBy('ACTIVE DESC, ID ASC')->asArray()->indexBy('ID')->all();
|
|
|
+ $data = self::getAllData();
|
|
|
Yii::$app->cache->set(Cache::CURRENCIES_KEY, $data);
|
|
|
return $data;
|
|
|
}
|