Kirin 3 سال پیش
والد
کامیت
c03a0aa3ff
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      app/api/controller/PublicController.php

+ 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) {