|
|
@@ -23,6 +23,7 @@ use backendApi\modules\v1\models\lists\shop\RemainPvList;
|
|
|
use backendApi\modules\v1\models\lists\shop\FlowRemainPvList;
|
|
|
use common\helpers\Cache;
|
|
|
use common\helpers\Form;
|
|
|
+use common\models\CurrencyConversions;
|
|
|
use common\models\DeclarationPackage;
|
|
|
use common\models\DecOrder;
|
|
|
use common\models\forms\DecPackageForm;
|
|
|
@@ -169,10 +170,14 @@ class ShopController 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;
|
|
|
// 商品属性
|
|
|
$country['SHOP_GOODS_NATURE'] = ShopGoodsNature::findAllAsArray('GOODS_ID=:GOODS_ID AND COUNTRY_ID=:COUNTRY_ID', [':GOODS_ID' => $id, ':COUNTRY_ID' => $country['ID']]);
|
|
|
}
|