Browse Source

会员升级

Kirin 11 months ago
parent
commit
9bf47a4be2

+ 1 - 1
app/controller/api/v1/user/UserExtractController.php

@@ -68,7 +68,7 @@ class UserExtractController
                 ->where('user_type', 0)
                 ->where('extract_type', '<>', 'balance')
                 ->where('status', 1)->sum('extract_fee');
-            $money_sum = bcadd((string)$sum_money, (string)$money, 2);
+            $money_sum = bcadd(bcadd((string)$sum_money, (string)$sum_fee,2), (string)$money, 2);
             $max_range = 0;
             $range = [];
             foreach ($fee as $v) {

+ 1 - 1
app/services/user/UserExtractServices.php

@@ -560,7 +560,7 @@ class UserExtractServices extends BaseServices
         $money = $data['money'];
         $extract_fee = 0;
         if ($data['user_type'] == 0) {
-            $money_sum = bcadd((string)$sum_money, (string)$money, 2);
+            $money_sum = bcadd(bcadd((string)$sum_money, (string)$sum_fee, 2), (string)$money, 2);
             $max_range = 0;
             $range = [];
             foreach ($fee as $v) {