Commit 347ac473 authored by 任国军's avatar 任国军

fix onlineCLass bug

parent 8d1b0c34
Pipeline #19548 passed with stage
in 1 minute 8 seconds
......@@ -106,7 +106,7 @@ class OnlineService extends Service {
const limit = Number(input.limit) || 10;
const offset = (page - 1) * limit;
const { type, mode, age, cat } = input;
const filter = { where: { status: 'online', is_deleted: 0 }, order: [[ 'institution_id', 'desc' ]], limit, offset, attributes: [ 'id', 'institution_id', 'name', 'price', 'type', 'age', 'mode', 'time', 'created_time' ] };
const filter = { where: { status: 'online', is_deleted: 0 }, order: [[ 'institution_id', 'desc' ]], limit, offset, attributes: [ 'id', 'institution_id', 'name', 'price', 'mode', 'time', 'created_time' ] };
// 年龄段筛选
let ids = [];
let flag = false;
......@@ -285,7 +285,7 @@ class OnlineService extends Service {
const userCollection = await ctx.classModel.V4.CourseUserCollection.findAndCountAll({ where: { user_uuid: userUuid, is_deleted: 0, type: 3 }, raw: true, limit, offset });
let classIds = R.pluck('type_id', userCollection.rows);
const filter = { where: { id: { $in: classIds }, status: 'online', is_deleted: 0 }, order: [[ 'institution_id', 'desc' ]], limit, offset, attributes: [ 'id', 'institution_id', 'name', 'price', 'type', 'age', 'mode', 'time', 'created_time' ] };
const filter = { where: { id: { $in: classIds }, status: 'online', is_deleted: 0 }, order: [[ 'institution_id', 'desc' ]], limit, offset, attributes: [ 'id', 'institution_id', 'name', 'price', 'mode', 'time', 'created_time' ] };
const classes = await ctx.classModel.V4.CourseOnlineClass.findAll(filter);
classIds = R.pluck('id', classes);
......
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