|
@@ -133,10 +133,15 @@ class LessonStudentService extends CrudService {
|
|
|
time: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
money: data.money,
|
|
|
};
|
|
|
+ // 创建退回余额的账单
|
|
|
await billModel.create(obj);
|
|
|
const relation = await this.rssModel.findOne({ student_id, school_id: data.school_id });
|
|
|
relation.money = _.get(relation, 'money', 0) + _.get(obj, 'money', 0);
|
|
|
+ // 退回至账户
|
|
|
await relation.save();
|
|
|
+ data.is_pay = '-3';
|
|
|
+ // 学员退课
|
|
|
+ await data.save();
|
|
|
}
|
|
|
|
|
|
|