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

fix collect

parent 74c73717
Pipeline #18459 passed with stage
in 54 seconds
......@@ -126,7 +126,7 @@ class InstitutionSubService extends Service {
areas = _.orderBy(areas, [ 'distance' ], [ 'asc' ]);
// 是否已收藏
const userCollect = await ctx.classModel.V3.CourseUserCollection.findOne({ where: { institution_id, user_uuid: userUuid, is_deleted: 0 } });
const userCollect = await ctx.classModel.V3.CourseUserCollection.findOne({ where: { type: 1, type_id: institution_id, user_uuid: userUuid, is_deleted: 0 } });
// 获取所有标签
const allTags = await ctx.classModel.V3.CourseTag.findAll({ where: { status: 'online', is_deleted: 0 } });
......@@ -307,8 +307,8 @@ class InstitutionSubService extends Service {
}
// 用户已收藏机构列表
const userInstitutions = await ctx.classModel.V3.CourseUserCollection.findAll({ where: { is_deleted: 0, user_uuid: userUuid } });
const userInstitutionIds = R.pluck('institution_id', userInstitutions);
const userInstitutions = await ctx.classModel.V3.CourseUserCollection.findAll({ where: { type: 1, is_deleted: 0, user_uuid: userUuid } });
const userInstitutionIds = R.pluck('type_id', userInstitutions);
// 机构图片及格式化
for (const i in institutionList) {
......
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