소스 검색

Merge branch 'bug_fix_1212_liu'

rkljw 3 달 전
부모
커밋
fb583a8ae6
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      app/JsonRpc/UserService.php

+ 3 - 3
app/JsonRpc/UserService.php

@@ -351,7 +351,7 @@ class UserService implements UserServiceInterface
      */
     public function addRole(array $data) :array
     {
-//        Db::beginTransaction();
+        Db::beginTransaction();
         try{
             $data['sort'] = intval($data['sort'])??0;
             Role::insertGetId($data);
@@ -361,9 +361,9 @@ class UserService implements UserServiceInterface
                 'type'=>1
             ];
             RoleLog::insertGetId($logData);
-//            Db::commit();
+            Db::commit();
         } catch(\Throwable $ex){
-//            Db::rollBack();
+            Db::rollBack();
             return Result::error("新增失败",0);
         }
         return Result::success([]);