lrf 2 năm trước cách đây
mục cha
commit
00004982b1
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      app/service/business/lessonStudent.js

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

@@ -58,8 +58,11 @@ class LessonStudentService extends CrudService {
       await this.payService.close(order_no);
       // 删了重做
       this.tran.remove('LessonStudent', id);
+      this.tran.remove('PayOrder', data.pay_id);
       await this.tran.run();
-      await this.create({ openid, money, school_id, student_id, lesson_id });
+      this.tran.clean();
+      const result = await this.create({ openid, money, school_id, student_id, lesson_id });
+      return result;
     } catch (error) {
       await this.tran.rollback();
     } finally {