浏览代码

发放层级收益

afa 5 月之前
父节点
当前提交
d1d7b9f7c8
共有 2 个文件被更改,包括 3 次插入5 次删除
  1. 2 3
      application/api/logic/CommonLogic.php
  2. 1 2
      application/api/logic/OrderLogic.php

+ 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) {