lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
1865a9a32d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/service/business/lessonStudent.js

+ 2 - 1
app/service/business/lessonStudent.js

@@ -122,13 +122,14 @@ class LessonStudentService extends CrudService {
         result.wxSign = wxSign;
       }
       await this.tran.run();
+      this.tran.clean();
       // 然后将pay_id赋给课程
       this.tran.update('LessonStudent', id, { pay_id });
       await this.tran.run();
       return result;
     } catch (error) {
       await this.tran.rollback();
-      throw Error(error);
+      throw new Error(error);
     } finally {
       this.tran.clean();
     }