Kirin 3 年之前
父节点
当前提交
42c278c40d
共有 1 个文件被更改,包括 2 次插入0 次删除
  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());
         }
     }