diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 059e8db6..16b73fb3 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1709,9 +1709,9 @@ WHERE A.Id = '{id}'"; var courseWareIds = new List(); if (record.CourseId.IsNullOrEmpty()) - courseWareIds = await Db.Queryable().Where(x => x.CourseSceneId == record.CourseSceneId || x.CourseSceneIds.Contains(record.CourseSceneId.ObjToString())).Select(x => x.CourseWareId).ToListAsync(); + courseWareIds = await Db.Queryable().Where(x => (x.CourseSceneId == record.CourseSceneId || x.CourseSceneIds.Contains(record.CourseSceneId.ObjToString())) && x.Status == Consts.DIC_COURSE_STATUS.RELEASED).Select(x => x.CourseWareId).ToListAsync(); else - courseWareIds = await Db.Queryable().Where(x => x.Id == record.CourseId).Select(x => x.CourseWareId).ToListAsync(); + courseWareIds = await Db.Queryable().Where(x => x.Id == record.CourseId && x.Status == Consts.DIC_COURSE_STATUS.RELEASED).Select(x => x.CourseWareId).ToListAsync(); #region 记录学习明细 var detail = new Ghre_StudyRecordDetail()