Commit 74c73717 authored by 任国军's avatar 任国军

fix like

parent 52e6e13e
Pipeline #18365 passed with stage
in 15 seconds
...@@ -776,7 +776,7 @@ class InstitutionSubService extends Service { ...@@ -776,7 +776,7 @@ class InstitutionSubService extends Service {
ctx.failed('数据不存在'); ctx.failed('数据不存在');
} }
// 更新点赞数 // 更新点赞数
await ctx.classModel.V3.CourseArticle.update({ read_count: sequelize.literal('`like_count` + 1') }, { where: { id: typeId } }); await ctx.classModel.V3.CourseArticle.update({ like_count: sequelize.literal('`like_count` + 1') }, { where: { id: typeId } });
break; break;
default: default:
break; break;
...@@ -811,7 +811,7 @@ class InstitutionSubService extends Service { ...@@ -811,7 +811,7 @@ class InstitutionSubService extends Service {
ctx.failed('数据不存在'); ctx.failed('数据不存在');
} }
// 更新点赞数 // 更新点赞数
await ctx.classModel.V3.CourseArticle.update({ read_count: sequelize.literal('`read_count` - 1') }, { where: { id: typeId } }); await ctx.classModel.V3.CourseArticle.update({ like_count: sequelize.literal('`like_count` - 1') }, { where: { id: typeId } });
break; break;
default: default:
break; break;
......
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