Commit 3b874974 authored by 李尚科's avatar 李尚科

fix

parent 074b6816
Pipeline #14393 passed with stage
in 5 seconds
...@@ -22,7 +22,7 @@ class InstitutionService extends Service { ...@@ -22,7 +22,7 @@ class InstitutionService extends Service {
//处理条件过滤条件 //处理条件过滤条件
let where = { status: 1, is_deleted: 0 }; let where = { status: 1, is_deleted: 0 };
if (cats) { if (Number(cats)) {
const cat_ret = await ctx.classModel.CourseCat.one({ where: { id: cats } }); const cat_ret = await ctx.classModel.CourseCat.one({ where: { id: cats } });
const cat_id = cat_ret.id; const cat_id = cat_ret.id;
const cat_level = cat_ret.level; const cat_level = cat_ret.level;
...@@ -35,7 +35,7 @@ class InstitutionService extends Service { ...@@ -35,7 +35,7 @@ class InstitutionService extends Service {
const institutions = await ctx.classModel.CourseInstitutionToCat.all({ where: { cat_id: { $in: cat_ids } } }); const institutions = await ctx.classModel.CourseInstitutionToCat.all({ where: { cat_id: { $in: cat_ids } } });
where.id = { $in: R.pluck('institution_id', institutions) }; where.id = { $in: R.pluck('institution_id', institutions) };
} }
if (ages) { if (Number(ages)) {
where.max_age = { $gte: ages }; where.max_age = { $gte: ages };
where.min_age = { $lte: ages }; where.min_age = { $lte: ages };
} }
......
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