Browse Source

发放代数收益

afa 8 months ago
parent
commit
915786fde5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common/model/LedgerWalletModel.php

+ 2 - 2
application/common/model/LedgerWalletModel.php

@@ -165,7 +165,7 @@ class LedgerWalletModel extends Model
      * @return void
      * @throws Exception
      */
-    public  function sendUserSubFrozen(int $uid,  string $amount, int $action, string $icn)
+    public  function sendUserSubFrozen(int $uid, string $amount, int $action, string $icn)
     {
         $available = $this->getWallet($uid);
         $ledgerWalletModel  = new LedgerWalletModel();
@@ -173,7 +173,7 @@ class LedgerWalletModel extends Model
 
         $newAmount = $available->token;
         // 创建账变记录
-        $insertRs = $ledgerWalletModel->update(['token' => bcsub($newAmount, $amount, 6), 'frozen' => bcadd($available->frozen, $amount, 6)]);
+        $insertRs = $ledgerWalletModel->where('user_id', $uid)->update(['token' => bcsub($newAmount, $amount, 6), 'frozen' => bcadd($available->frozen, $amount, 6)]);
 
         // 创建账变记录
         $insertRs = $ledgerWalletModel->insert([