Browse Source

调试topup协议增加多个余额的问题

stanley-king 8 years ago
parent
commit
f6c9a02f83
1 changed files with 4 additions and 0 deletions
  1. 4 0
      helper/bonus_helper.php

+ 4 - 0
helper/bonus_helper.php

@@ -127,8 +127,11 @@ class bonus_helper
     static public function topup_bonus($mobile)
     {
         $mod_bonus = Model('user_bonus');
+
+        Db::beginTransaction();
         $bind_bonus = $mod_bonus->getBinded($mobile);
         if(empty($bind_bonus)) {
+            Db::commit();
             return false;
         }
 
@@ -157,6 +160,7 @@ class bonus_helper
                 Db::rollback();
             }
         }
+        Db::commit();
 
         if(empty($bonusex)) {
             return false;