afa 5 mesiacov pred
rodič
commit
a6142f71d0

+ 3 - 4
application/common/model/LedgerWalletModel.php

@@ -155,7 +155,7 @@ class LedgerWalletModel extends Model
      * @return void
      * @throws Exception
      */
-    public  function setChangeFrozen(int $uid, string $amount, int $action, int $token, string $icn, int $from_id = 0)
+    public  function setChangeFrozen(int $uid, string $amount, int $action, int $type, string $icn, int $from_id = 0)
     {
         $available = $this->getWallet($uid);
         $ledgerWalletModel  = new LedgerWalletModel();
@@ -176,7 +176,7 @@ class LedgerWalletModel extends Model
                 $walletUpdate = ['token'=> bcadd($totalAmount, -$amount, 6), 'frozen' => 0];
                 //添加茶宝账变记录
                 $subAmount = $token = bcsub($amount, $available['frozen'], 6);
-                $this->changeWalletAccount($uid, Asset::TOKEN, -$subAmount, $token, $from_id);
+                $this->changeWalletAccount($uid, Asset::TOKEN, -$subAmount, $type, $from_id);
             }
             //添加冻结
             $newAmount = $walletUpdate['frozen'];
@@ -192,7 +192,7 @@ class LedgerWalletModel extends Model
             $newAmount = $amount; //剩余的冻结金额
             //添加冻结
             $walletUpdate =['token' => $chabao, 'frozen' =>$newAmount];
-            $this->changeWalletAccount($uid, Asset::TOKEN, $sunAmount, $token, $from_id);
+            $this->changeWalletAccount($uid, Asset::TOKEN, $sunAmount, $type, $from_id);
             $result = true;
         }
       
@@ -207,7 +207,6 @@ class LedgerWalletModel extends Model
                 'create_time'    => time(),
                 'action'         => $action
             ]);
-
             return [$token, $frozen];
         }
     }