laowu 1 dzień temu
rodzic
commit
7da90fab02

+ 2 - 1
app/Http/logic/api/NewSupefinaSpeiLogic.php

@@ -413,6 +413,7 @@ class NewSupefinaSpeiLogic extends BaseApiLogic
                     'State'      => 2,
                     'agent'      => $agentID,
                     'finishDate' => $now,
+                    'withdraw_fee' => $realityFee * NumConfig::NUM_VALUE,
                 ];
 
                 // 增加提现记录
@@ -460,7 +461,7 @@ class NewSupefinaSpeiLogic extends BaseApiLogic
                 RecordUserDataStatistics::updateOrAdd($UserID, $TakeMoney, 0, $ServiceFee);
                 $fee = DB::table('QPAccountsDB.dbo.OrderWithDraw')->where('OrderId', $OrderId)
                     ->value('withdraw_fee');
-                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $fee, $ServiceFee);
+                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $realityFee * NumConfig::NUM_VALUE, $ServiceFee);
 
                 $redis = Redis::connection();
                 $redis->incr('draw_'.date('Ymd').$UserID);

+ 3 - 3
app/Http/logic/api/StarPayCashierLogic.php

@@ -4,6 +4,7 @@ namespace App\Http\logic\api;
 
 use App\Constant\Payment;
 use App\dao\Estatisticas\RechargeWithDraw;
+use App\Http\helper\NumConfig;
 use App\Inter\CashierInterFace;
 use App\Models\PrivateMail;
 use App\Models\RecordUserDataStatistics;
@@ -190,6 +191,7 @@ class StarPayCashierLogic implements CashierInterFace
                     'State'      => 2,
                     'agent'      => $agentID,
                     'finishDate' => $now,
+                    'withdraw_fee' => $realityFee * NumConfig::NUM_VALUE,
                 ];
 
                 // 增加提现记录
@@ -235,9 +237,7 @@ class StarPayCashierLogic implements CashierInterFace
 
                 $ServiceFee = $query->ServiceFee;
                 RecordUserDataStatistics::updateOrAdd($UserID, $TakeMoney, 0, $ServiceFee);
-                $fee = DB::table('QPAccountsDB.dbo.OrderWithDraw')->where('OrderId', $OrderId)
-                    ->value('withdraw_fee');
-                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $fee, $ServiceFee);
+                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $realityFee * NumConfig::NUM_VALUE, $ServiceFee);
 
                 $redis = Redis::connection();
                 $redis->incr('draw_'.date('Ymd').$UserID);

+ 2 - 4
app/Http/logic/api/StarPayLogic.php

@@ -133,7 +133,7 @@ class StarPayLogic extends BaseApiLogic
 
             $payAmt = round($realityAmount, 2);
             $amountInScore = (int) round($payAmt * NumConfig::NUM_VALUE);
-
+            $paymentFee = $post['tradeCharge'] ?? 0;
             $body = [
                 'payment_sn'   => $r->orderNo,
                 'pay_status'   => 1,
@@ -141,11 +141,9 @@ class StarPayLogic extends BaseApiLogic
                 'finished_at'  => date('Y-m-d H:i:s'),
                 'amount'       => $amountInScore,
                 'updated_at'   => date('Y-m-d H:i:s'),
+                'payment_fee' => $paymentFee * NumConfig::NUM_VALUE
             ];
 
-            $config = (new PayConfig())->getConfig('StarPay');
-            $body['payment_fee'] = isset($config['payin_fee']) ? $amountInScore * $config['payin_fee'] : 0;
-
             $service = new OrderServices();
             if ((int)$order->amount != $amountInScore) {
                 $body['GiftsID'] = 0;

+ 3 - 3
app/Http/logic/api/SupefinaSpeiCashierLogic.php

@@ -3,6 +3,7 @@
 namespace App\Http\logic\api;
 
 use App\dao\Estatisticas\RechargeWithDraw;
+use App\Http\helper\NumConfig;
 use App\Inter\CashierInterFace;
 use App\Models\PrivateMail;
 use App\Models\RecordUserDataStatistics;
@@ -244,6 +245,7 @@ class SupefinaSpeiCashierLogic implements CashierInterFace
                     'State'      => 2,
                     'agent'      => $agentID,
                     'finishDate' => $now,
+                    'withdraw_fee' => $realityFee * NumConfig::NUM_VALUE,
                 ];
 
                 // 增加提现记录
@@ -289,9 +291,7 @@ class SupefinaSpeiCashierLogic implements CashierInterFace
 
                 $ServiceFee = $query->ServiceFee;
                 RecordUserDataStatistics::updateOrAdd($UserID, $TakeMoney, 0, $ServiceFee);
-                $fee = DB::table('QPAccountsDB.dbo.OrderWithDraw')->where('OrderId', $OrderId)
-                    ->value('withdraw_fee');
-                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $fee, $ServiceFee);
+                (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $realityFee * NumConfig::NUM_VALUE, $ServiceFee);
 
                 $redis = Redis::connection();
                 $redis->incr('draw_'.date('Ymd').$UserID);

+ 1 - 2
app/Http/logic/api/SupefinaSpeiLogic.php

@@ -180,8 +180,7 @@ class SupefinaSpeiLogic extends BaseApiLogic
                 'updated_at'   => date('Y-m-d H:i:s'),
             ];
 
-            $config = (new PayConfig())->getConfig('SupefinaSpei');
-            $body['payment_fee'] = isset($config['payin_fee']) ? $amountInScore * $config['payin_fee'] : 0;
+            $body['payment_fee'] = $post['realityFee'] * NumConfig::NUM_VALUE;
 
             $service = new OrderServices();
             if ((int)$order->amount != $amountInScore) {