Commit 44e63ac9 authored by 任国军's avatar 任国军

add article sort id desc

parent 5e10aa79
Pipeline #19008 passed with stage
in 9 seconds
......@@ -835,7 +835,7 @@ class InstitutionSubService extends Service {
const limit = Number(input.limit) || 2;
const offset = (page - 1) * limit;
const articles = await ctx.classModel.V4.CourseArticle.findAndCountAll({ where: { is_recommend: 1, status: 'online', is_deleted: 0 }, order: [[ 'sort', 'asc' ]], limit, offset });
const articles = await ctx.classModel.V4.CourseArticle.findAndCountAll({ where: { is_recommend: 1, status: 'online', is_deleted: 0 }, order: [[ 'sort', 'asc' ], [ 'id', 'desc' ]], limit, offset });
// 获取分类
const cats = await ctx.classModel.V4.CourseCat.findAll({ where: { status: 'online', is_deleted: 0 } });
const catMap = new Map();
......
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