@@ -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 });
return result;
} catch (error) {
await this.tran.rollback();
- throw Error(error);
+ throw new Error(error);
} finally {
this.tran.clean();