lrf před 2 roky
rodič
revize
1865a9a32d
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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();
     }