wesmiler 1 settimana fa
parent
commit
fe0ba46b19
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      app/Services/Api/BalanceLogService.php

+ 13 - 0
app/Services/Api/BalanceLogService.php

@@ -226,8 +226,21 @@ class BalanceLogService extends BaseService
         $ptMoney = 0;
         $ptRate = 0;
         $poolRate = 0;
+        $total = $money;
         $actualMoney = $money;
         if($accountType==2){
+            // 提现金额
+            $price = PriceService::make()->getTodayPrice(1);
+            if($price<=0){
+                $this->error = '请等候今日资产价格刷新后重试~';
+                RedisService::clear($cacheLockKey);
+                return false;
+            }
+
+            $rate = ConfigService::make()->getConfigByCode('withdraw_2_rate',0);
+            $rate = $rate>0 && $rate<=100? $rate : 100;
+            $actualMoney = moneyFormat($total * $price * $rate/100, 2);
+
             // 结算比例
             $rate = ConfigService::make()->getConfigByCode('withdraw_2_rate',0);
             $rate = $rate>0 && $rate<=100? $rate : 100;