lrf 2 роки тому
батько
коміт
00004982b1
1 змінених файлів з 4 додано та 1 видалено
  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);
       await this.payService.close(order_no);
       // 删了重做
       // 删了重做
       this.tran.remove('LessonStudent', id);
       this.tran.remove('LessonStudent', id);
+      this.tran.remove('PayOrder', data.pay_id);
       await this.tran.run();
       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) {
     } catch (error) {
       await this.tran.rollback();
       await this.tran.rollback();
     } finally {
     } finally {