Parcourir la source

发放层级收益

afa il y a 5 mois
Parent
commit
d1d7b9f7c8

+ 2 - 3
application/api/logic/CommonLogic.php

@@ -66,9 +66,8 @@ class CommonLogic
                   $income = bcmul($num, config('team_level_inc'), 2);
                   //余额记录
                   foreach($paths as $pathId){
-                        if(!empty(Loader::model('UserModel')::getTeamLevelId($pathId))) 
-                        {
-                              Loader::model('LedgerWalletModel')->changeWalletAccount($pathId, $asset, $income, $action, $user_id, true);
+                        if(!empty(Loader::model('UserModel')::getTeamLevelId($pathId))) {
+                              Loader::model('LedgerWalletModel')->changeWalletAccount($pathId, $asset, $income, $action, $user_id);
                         }
                   }
             }

+ 1 - 2
application/api/logic/OrderLogic.php

@@ -71,8 +71,7 @@ class OrderLogic
             $ledgerWalletModel = Loader::model('LedgerWalletModel');
             $ledgerTokenChangeModel = Loader::model('LedgerTokenChangeModel');
             $result = $productTransfer::whereIn('id', $orderId)->where('status', ProductTransfer::Normal)->select();
-            if (count($result) !=  count(explode(",", $orderId)))  if(empty($order_info)) throw new Exception(__("订单不存在"));
-            
+            if (count($result) !=  count(explode(",", $orderId))) throw new Exception(__("订单不存在"));
             $time = time();
             $endTime = config('market_transfer.lock_time');
             foreach ($result as $item) {