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

fix userReport bug

parent f23fa5ca
Pipeline #22275 passed with stage
in 3 seconds
...@@ -133,7 +133,7 @@ class ReportService extends Service { ...@@ -133,7 +133,7 @@ class ReportService extends Service {
async getReportById(reportId) { async getReportById(reportId) {
const { ctx } = this; const { ctx } = this;
const userReportInfo = await ctx.classModel.V5.CourseUserReport.findOne({ id: reportId, status: 1, is_deleted: 0 }); const userReportInfo = await ctx.classModel.V5.CourseUserReport.findOne({ where: { id: reportId, status: 1, is_deleted: 0 }, raw: true });
if (ctx.isEmpty(userReportInfo)) { if (ctx.isEmpty(userReportInfo)) {
ctx.failed('尚未生成报告'); ctx.failed('尚未生成报告');
} }
......
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