lrf 2 years ago
parent
commit
1865a9a32d
1 changed files with 2 additions and 1 deletions
  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;
         result.wxSign = wxSign;
       }
       }
       await this.tran.run();
       await this.tran.run();
+      this.tran.clean();
       // 然后将pay_id赋给课程
       // 然后将pay_id赋给课程
       this.tran.update('LessonStudent', id, { pay_id });
       this.tran.update('LessonStudent', id, { pay_id });
       await this.tran.run();
       await this.tran.run();
       return result;
       return result;
     } catch (error) {
     } catch (error) {
       await this.tran.rollback();
       await this.tran.rollback();
-      throw Error(error);
+      throw new Error(error);
     } finally {
     } finally {
       this.tran.clean();
       this.tran.clean();
     }
     }