wesmiler hai 1 semana
pai
achega
fe0ba46b19
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  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;