lrf 2 anni fa
parent
commit
1865a9a32d
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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();
     }