lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
e42f3c0349

+ 1 - 1
app/controller/apply/config/.tempLessonApply.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['openid', 'school_id', 'lesson_id', 'coach_id', 'student_id', 'name', 'phone', 'file', 'is_pay', 'pay_id'],
+    requestBody: ['school_id', 'lesson_id', 'coach_id', 'student_id', 'name', 'phone', 'file', 'is_pay', 'pay_id'],
   },
   destroy: {
     params: ['!id'],

+ 2 - 0
app/service/apply/tempLessonApply.js

@@ -10,6 +10,7 @@ class TempLessonApplyService extends CrudService {
   constructor(ctx) {
     super(ctx, 'templessonapply');
     this.model = this.ctx.model.Apply.TempLessonApply;
+    this.studentModel = this.ctx.model.User.Student;
     this.payOrderModel = this.ctx.model.Business.PayOrder;
     this.rssModel = this.ctx.model.Relation.RelationStudentSchool;
     this.tran = new Transaction();
@@ -88,6 +89,7 @@ class TempLessonApplyService extends CrudService {
       return result;
     } catch (error) {
       await this.tran.rollback();
+      console.log(error);
     } finally {
       this.tran.clean();
     }