From ac48199e763a09c38e5cfcd25279a4fae1195f59 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 6 Nov 2024 09:19:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E4=B9=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2pdf=E6=96=87=E4=BB=B6=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 4785457c..4697c734 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1250,6 +1250,8 @@ WHERE A.Id = '{id}'"; for (int j = 0; j < course.CourseWareList.Count; j++) { course.CourseWareList[j].Attachments = await Db.Queryable().Where(x => x.CourseWareId == course.CourseWareList[j].Id).ToListAsync(); + if (course.CourseWareList[j].Attachments != null && course.CourseWareList[j].Attachments.Any()) + course.CourseWareList[j].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath); } if (course.CourseBeginTime != null && course.CourseEndTime != null) @@ -1269,8 +1271,8 @@ WHERE A.Id = '{id}'"; course.CourseStandardDuration1 = mins; } - if (course.StudyDuration1.IsNull()) - course.StudyDuration = $"0 分 0 秒"; + if (course.StudyDuration1.IsNull()) + course.StudyDuration = $"0 分 0 秒"; else { var dt = DateTime.Now;