Commit 2c61b187 authored by 任国军's avatar 任国军

fix

parent d59a682d
Pipeline #24920 passed with stage
in 4 seconds
......@@ -491,15 +491,16 @@ class InstitutionSubService extends Service {
const classAll = await ctx.classModel.V5.CourseV5ClassToCat.findAll({ where: { cat_id, status: 1, is_deleted: 0 } });
const classIds = R.pluck('class_id', classAll);
// 体验课
classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: classIds }, price_type: 1, status: 1, is_deleted: 0 }, attributes, order: [[ 'sort', 'asc' ], [ 'id', 'desc' ]], offset: 0, limit: 3, raw: true });
// 精品课
classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: classIds }, price_type: 3, status: 1, is_deleted: 0 }, attributes, order: [[ 'sort', 'asc' ], [ 'id', 'desc' ]], offset: 0, limit: 3, raw: true });
classList = await this.formatClassList(classList);
for (const i in classList) {
classList[i].institution_icon = '';
}
results.push({
title: '体验课',
value: 1,
title: '精品课',
value: 3,
class: classList,
});
......@@ -515,15 +516,15 @@ class InstitutionSubService extends Service {
class: classList,
});
// 精品
classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: classIds }, price_type: 3, status: 1, is_deleted: 0 }, attributes, order: [[ 'sort', 'asc' ], [ 'id', 'desc' ]], offset: 0, limit: 3, raw: true });
// 体验
classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { id: { $in: classIds }, price_type: 1, status: 1, is_deleted: 0 }, attributes, order: [[ 'sort', 'asc' ], [ 'id', 'desc' ]], offset: 0, limit: 3, raw: true });
classList = await this.formatClassList(classList);
for (const i in classList) {
classList[i].institution_icon = '';
}
results.push({
title: '精品课',
value: 3,
title: '体验课',
value: 1,
class: classList,
});
......
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