lrf 2 éve
szülő
commit
687aab95a0
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      app/service/business/lessonStudent.js

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

@@ -116,7 +116,7 @@ class LessonStudentService extends CrudService {
         // 有余额扣款部分,查账单把钱加上
         // 有余额扣款部分,查账单把钱加上
         const billId = _.get(payOrder, 'config,bill');
         const billId = _.get(payOrder, 'config,bill');
         const bill = await this.billModel.findById(billId);
         const bill = await this.billModel.findById(billId);
-        // obj.money = _.get(obj, 'money', 0) + _.get(bill, 'money', 0);
+        obj.money = _.get(obj, 'money', 0) + _.get(bill, 'money', 0);
         bill.is_pay = '-3';
         bill.is_pay = '-3';
         await bill.save();
         await bill.save();
       }
       }
@@ -128,6 +128,7 @@ class LessonStudentService extends CrudService {
       else if (payer_role === 'Coach') relation = await this.rcsModel.findOne({ coach_id: payer_id, school_id });
       else if (payer_role === 'Coach') relation = await this.rcsModel.findOne({ coach_id: payer_id, school_id });
       relation.money = _.get(relation, 'money', 0) + _.get(obj, 'money', 0);
       relation.money = _.get(relation, 'money', 0) + _.get(obj, 'money', 0);
       await relation.save();
       await relation.save();
+      return;
     }
     }
     // 从余额付款,退回余额
     // 从余额付款,退回余额
     const obj = {
     const obj = {