|
|
|
@ -1288,7 +1288,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
#region 场景ID获取课程 |
|
|
|
|
public async Task<ServiceResult<List<Ghre_CourseDto>>> QueryBySceneId(long courseSceneId) |
|
|
|
|
{ |
|
|
|
|
var entitys = await base.Query(x => x.CourseSceneId == courseSceneId && x.Status == Consts.DIC_COURSE_STATUS.RELEASED); |
|
|
|
|
var entitys = await base.Query(x => x.CourseSceneId != null && x.CourseSceneIds.Contains(courseSceneId.ObjToString()) && x.Status == Consts.DIC_COURSE_STATUS.RELEASED); |
|
|
|
|
var courseWareIds = entitys.Select(x => x.CourseWareId).Distinct().ToList(); |
|
|
|
|
var attachments = await Db.Queryable<Ghre_CourseWareAttachment>().Where(x => courseWareIds.Contains(x.CourseWareId)).ToListAsync(); |
|
|
|
|
//var attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId != null && attachmentIds.Contains(x.CourseWareId.Value)); |
|
|
|
|