Kirin 3 years ago
parent
commit
42c278c40d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/models/game/Lottery.php

+ 2 - 0
app/models/game/Lottery.php

@@ -131,8 +131,10 @@ class Lottery extends BaseModel
             Cache::set('last_game', $name, 60);
             Cache::set('last_open', $result, 60);
             Cache::set('open_time', time(), 60);
+            self::commitTrans();
             return true;
         } catch (\Exception $e) {
+            self::rollbackTrans();
             return self::setErrorInfo($e->getMessage());
         }
     }