|
|
@@ -9,6 +9,7 @@ namespace backendApi\modules\v1\controllers;
|
|
|
|
|
|
use common\helpers\snowflake\PageSnowFake;
|
|
|
use common\helpers\Tool;
|
|
|
+use common\models\CurrencyConversions;
|
|
|
use common\models\DealType;
|
|
|
use common\models\Period;
|
|
|
use common\models\RegType;
|
|
|
@@ -184,9 +185,13 @@ class SiteController extends BaseController
|
|
|
// 货币
|
|
|
$currencies = Cache::getCurrencies();
|
|
|
$currencies = array_column($currencies, NULL, 'ID');
|
|
|
+ // 货币汇率
|
|
|
+ $currenciesConversions = CurrencyConversions::getFromCache();
|
|
|
+ $currenciesConversions = array_column($currenciesConversions, NULL, 'TO_CURRENCY_ID');
|
|
|
|
|
|
foreach ($countries as &$country) {
|
|
|
$country['LOCAL_CURRENCY_NAME'] = $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '';
|
|
|
+ $country['CURRENCY_PRODUCT_RATE'] = $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
}
|
|
|
|
|
|
return static::notice(['data' => $countries]);
|