|
@@ -112,7 +112,7 @@ class LessonStudentService extends CrudService {
|
|
|
const { payer_role, payer_id, school_id } = payOrder;
|
|
|
if (payer_role === 'Student') relation = await this.rssModel.findOne({ student_id: payer_id, school_id });
|
|
|
else if (payer_role === 'Coach') relation = await this.rcsModel.findOne({ coach_id: payer_id, school_id });
|
|
|
- relation.money = relation.money + obj.money;
|
|
|
+ relation.money = _.get(relation, 'money', 0) + _.get(obj, 'money', 0);
|
|
|
await relation.save();
|
|
|
|
|
|
}
|