Kirin 3 năm trước cách đây
mục cha
commit
c03a0aa3ff

+ 2 - 0
app/api/controller/PublicController.php

@@ -47,8 +47,10 @@ class PublicController
             $res = $res && self::pinkIntegral($uid);
             $res = $res && self::pinkIntegral($uid);
             $res = $res && self::pinkRecommend($uid);
             $res = $res && self::pinkRecommend($uid);
             if ($res) {
             if ($res) {
+                BaseModel::commitTrans();
                 return app('json')->success('成功');
                 return app('json')->success('成功');
             } else {
             } else {
+                BaseModel::rollbackTrans();
                 return app('json')->fail('失败');
                 return app('json')->fail('失败');
             }
             }
         } catch (Exception $e) {
         } catch (Exception $e) {