wesmiler 2 лет назад
Родитель
Сommit
5a1a876fb1
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      app/Services/Api/GoodsService.php

+ 5 - 1
app/Services/Api/GoodsService.php

@@ -101,7 +101,11 @@ class GoodsService extends BaseService
             $locale = $locale ? $locale : session('locale_lang');
             $locale = $locale ? $locale : 'zh-cn';
             $supplyList = config('goods.supplyList');
-            $usdtPrice = WalletService::make()->getBianRatePrice();
+            $usdtPrice = RedisService::get("caches:wallet:usdt_rate");
+            if($usdtPrice<=0){
+                $usdtCnyPrice = ConfigService::make()->getConfigByCode('usdt_cny_price', 7.2);
+                $usdtPrice = $usdtCnyPrice>0 && $usdtCnyPrice< 100? $usdtCnyPrice : 0;
+            }
             $xdPrice = ConfigService::make()->getConfigByCode('xd_price', 100);
             $xdPrice = $xdPrice > 0 && $xdPrice <= 10000 ? $xdPrice : 100;
             foreach ($list['data'] as &$item) {