lrf il y a 2 ans
Parent
commit
662a6a1b37

+ 0 - 4
app/service/business/lesson.js

@@ -11,10 +11,6 @@ class LessonService extends CrudService {
     this.model = this.ctx.model.Business.Lesson;
   }
 
-  // TODO:缺少:使用coach_id/student_id查询课程:教练/学生看自己的课程
-
-  // TODO:缺少:修改课程为下课状态,给教师结工资的问题
-
   /**
    * 处理下课的课程进行结算
    * @param {Object} filter 修改条件

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

@@ -18,7 +18,7 @@ class LessonStudentService extends CrudService {
     const { lesson_id, school_id, student_id } = body;
     // 检查是否已经有数据
     const data = await this.model.findOne({ lesson_id, school_id, student_id });
-    // 数据已存在,检查是否是申请试听
+    // 数据已存在
     if (data) throw new BusinessError(ErrorCode.DATA_EXISTED, '您已报名');
     // 数据不存在
     const { is_try } = body;

+ 3 - 1
app/service/business/payOrder.js

@@ -42,7 +42,9 @@ class PayOrderService extends CrudService {
     const { form_id: _id, status: is_pay } = data;
     if (pay_for === 'lessonStudent') {
       // 因为上课产生的支付,去找lessonStudent,修改指定学生的支付状态
-      await this.lessonStudentModel.updateOne({ _id }, { is_pay });
+      console.log(is_pay, _id);
+      const r = await this.lessonStudentModel.updateOne({ _id }, { is_pay });
+      console.log(r);
     } else if (pay_for === 'tempLessonApply') {
       // 私教课临时上课,需要到临时申请那找到相关数据,再修改lessonStudent
       const tempApply = await this.tempLessonApplyModel.findById(_id);