Commit eddd3606 authored by 任国军's avatar 任国军

change cat_id to category

parent 6ae206e6
Pipeline #21660 passed with stage
in 17 seconds
...@@ -22,14 +22,12 @@ class InstitutionSubService extends Service { ...@@ -22,14 +22,12 @@ class InstitutionSubService extends Service {
if (!ctx.isEmpty(input.age)) { if (!ctx.isEmpty(input.age)) {
const filterByAge = await ctx.classModel.V5.CourseV5ClassToAge.findAll({ where: { age_id: input.age, status: 1, is_deleted: 0 }, attributes: [ 'class_id' ] }); const filterByAge = await ctx.classModel.V5.CourseV5ClassToAge.findAll({ where: { age_id: input.age, status: 1, is_deleted: 0 }, attributes: [ 'class_id' ] });
filterIds = R.pluck('class_id', filterByAge); filterIds = R.pluck('class_id', filterByAge);
console.log(filterIds);
flag = true; flag = true;
} }
// 科目类型 // 科目类型
if (!ctx.isEmpty(input.cat_id)) { if (!ctx.isEmpty(input.category)) {
const filterByCategory = await ctx.classModel.V5.CourseV5ClassToCat.findAll({ where: { cat_id: input.cat_id, status: 1, is_deleted: 0 }, attributes: [ 'class_id' ] }); const filterByCategory = await ctx.classModel.V5.CourseV5ClassToCat.findAll({ where: { cat_id: input.category, status: 1, is_deleted: 0 }, attributes: [ 'class_id' ] });
filterIds = flag ? _.intersection(filterIds, R.pluck('class_id', filterByCategory)) : R.pluck('class_id', filterByCategory); filterIds = flag ? _.intersection(filterIds, R.pluck('class_id', filterByCategory)) : R.pluck('class_id', filterByCategory);
console.log(filterIds);
flag = true; flag = true;
} }
// 课程状态 // 课程状态
......
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