瀏覽代碼

修改记录

zs 10 月之前
父節點
當前提交
894192fad3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/service/core/record.service.ts

+ 2 - 2
src/service/core/record.service.ts

@@ -44,12 +44,12 @@ export class RecordService extends BaseService<modelType> {
       if (get(val, 'video_id')) {
         // 查询视频信息
         const videoData = await this.vModel.findById(val.video_id).lean();
-        if (videoData) Object.assign(val, { video_name: videoData.title });
+        if (videoData) Object.assign(val, { videoInfo: videoData, video_name: videoData.title });
       }
       if (get(val, 'course_id')) {
         // 查询视频信息
         const courseData = await this.cModel.findById(val.course_id).lean();
-        if (courseData) Object.assign(val, { course_name: courseData.title });
+        if (courseData) Object.assign(val, { courseInfo: courseData, course_name: courseData.title });
       }
     }
     const total = await this.model.count(info);