Browse Source

钱包操作方法

lizhen_gitee 3 years ago
parent
commit
6da28d0abe
1 changed files with 7 additions and 1 deletions
  1. 7 1
      application/common/model/Wallet.php

+ 7 - 1
application/common/model/Wallet.php

@@ -142,7 +142,13 @@ class Wallet extends Model
                     $log_table = 'user_gold_log';
                 }
                 $rs2_id = Db::name($log_table)->insertGetId($data);
-                if( $rs1 && $rs2_id )
+
+                if($rs1 === false || $rs2_id === false){
+                    $result['msg'] = '更新财务记录失败!';
+                    return $result;
+                }
+
+                if( $rs1 !== false && $rs2_id !== false )
                 {
                     //金额变动
                     /*$params = [