Compare commits

...

2 Commits

Author SHA1 Message Date
GoCo
10c03265d8 Merge branch 'dev2' of http://110.42.96.64:19890/GoCo/OL-LearnPlatform-Backend into dev2
merge
2025-09-23 13:58:10 +08:00
GoCo
d7944a0c64 feat: 🎸 查询章节详情 修改 2025-09-23 13:58:02 +08:00
2 changed files with 28 additions and 3 deletions

View File

@ -27,11 +27,11 @@ public final class EntityLinkConst {
/** 内容类型 */
public static final class TargetType {
private TargetType() {}
// 资源对应资源表
// 资源对应资源表包括视频和文档
public static final String RESOURCE = "resource";
// 作业对应作业表
public static final String HOMEWORK = "homework";
// 考试对应考试表
// 考试对应考试表包括考试和练习
public static final String EXAM = "exam";
// 课程
public static final String COURSE = "course";

View File

@ -82,6 +82,12 @@ public class AiolCourseServiceImpl extends ServiceImpl<AiolCourseMapper, AiolCou
@Autowired
private AiolLearnProgressMapper learnProgressMapper;
@Autowired
private AiolExamMapper examMapper;
@Autowired
private AiolDiscussionMapper discussionMapper;
@Autowired
private RedisUtil redisUtil;
@ -135,6 +141,14 @@ public class AiolCourseServiceImpl extends ServiceImpl<AiolCourseMapper, AiolCou
// 作业章节
targetType = EntityLinkConst.TargetType.HOMEWORK;
break;
case 4:
// 练习章节
targetType = EntityLinkConst.TargetType.EXAM;
break;
case 5:
// 讨论章节
targetType = EntityLinkConst.TargetType.DISCUSSION;
break;
default:
break;
}
@ -157,12 +171,23 @@ public class AiolCourseServiceImpl extends ServiceImpl<AiolCourseMapper, AiolCou
result.add(clazz.cast(resourceMapper.selectById(targetId)));
break;
case 2:
// TODO 考试章节
// 考试章节
result.add(clazz.cast(examMapper.selectById(targetId)));
break;
case 3:
// 作业章节
result.add(clazz.cast(homeworkMapper.selectById(targetId)));
break;
case 4:
// 练习章节
result.add(clazz.cast(examMapper.selectById(targetId)));
break;
case 5:
// 讨论章节
result.add(clazz.cast(discussionMapper.selectById(targetId)));
break;
default:
break;
}
}