Commit 4b47e173 authored by 任国军's avatar 任国军

relation add logo

parent bf5b168b
Pipeline #24808 passed with stage
in 4 seconds
...@@ -149,7 +149,7 @@ class InstitutionSubService extends Service { ...@@ -149,7 +149,7 @@ class InstitutionSubService extends Service {
// 关联课程 // 关联课程
const relationList = await ctx.classModel.V5.CourseV5ClassRelation.findAll({ where: { class_id: id, status: 1, is_deleted: 0 }, attributes: [ 'relation_id' ] }); const relationList = await ctx.classModel.V5.CourseV5ClassRelation.findAll({ where: { class_id: id, status: 1, is_deleted: 0 }, attributes: [ 'relation_id' ] });
const relation = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: R.pluck('relation_id', relationList) } }, attributes: [ 'id', 'name', 'price', 'mode' ], raw: true }); const relation = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: R.pluck('relation_id', relationList) } }, attributes: [ 'id', 'name', 'price', 'mode', 'logo' ], raw: true });
for (const i in relation) { for (const i in relation) {
relation[i].mode = await this.getClassMode(relation[i].mode); relation[i].mode = await this.getClassMode(relation[i].mode);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment