| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.qxueyou.scc.admin.classes.model.ClsClassReSubject; |
| | | import com.qxueyou.scc.admin.classes.service.IClassLectureService; |
| | | import com.qxueyou.scc.teach.subject.model.Subject; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * 课件控制器 |
| | | * |
| | | * |
| | | * @author chenjunliang |
| | | * |
| | | */ |
| | |
| | | ILectureService lectureService; |
| | | |
| | | @Autowired |
| | | IClassLectureService classLectureService; |
| | | |
| | | @Autowired |
| | | IResService resService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | /** |
| | | * 加载课件tree |
| | | * |
| | | * |
| | | * @param parentId |
| | | * 父节点id |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取课件列表 |
| | | * |
| | | * |
| | | * @param chapterId |
| | | * 章节id |
| | | * @param type |
| | |
| | | |
| | | /** |
| | | * 查看课件 |
| | | * |
| | | * |
| | | * @param id |
| | | * 课件id |
| | | * @param attribute |
| | |
| | | |
| | | /** |
| | | * 删除课件 |
| | | * |
| | | * |
| | | * @param id |
| | | * 课件ids |
| | | */ |
| | | @GetMapping(value = "deleteCourseware") |
| | | public Result deleteCourseware(String id) { |
| | | |
| | | return lectureService.deleteLecture(id.split(",")); |
| | | Result result = lectureService.deleteLecture(id.split(",")); |
| | | lectureService.deleteLectureLoad(id.split(",")); |
| | | return result; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 课件的复制 |
| | | * |
| | | * |
| | | * @param id |
| | | * 课件id |
| | | * @param type |
| | |
| | | |
| | | /** |
| | | * 课件的移动 |
| | | * |
| | | * |
| | | * @param id |
| | | * 课件id |
| | | * @param type |
| | |
| | | |
| | | /** |
| | | * 课件管理 新增下级,同级 |
| | | * |
| | | * |
| | | * @param type |
| | | * (add:新增,edit :编辑) |
| | | * @param chapterId |
| | |
| | | * 名称 |
| | | * @param childFlag |
| | | * 是否操作下级 |
| | | * |
| | | * |
| | | */ |
| | | @PostMapping(value = "addOrUpdateChapter") |
| | | public Result addOrUpdateChapter(String type, String name, String chapterId, String subjectId, boolean childFlag) { |
| | |
| | | |
| | | /** |
| | | * 课件管理 目录删除 |
| | | * |
| | | * |
| | | * @param chapterId |
| | | * Ŀ¼id |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 添加/更新(视频,讲义,音频) |
| | | * |
| | | * |
| | | * @param name |
| | | * 名称 |
| | | * @param coverUrl |
| | |
| | | |
| | | /** |
| | | * 编辑 获取内容 |
| | | * |
| | | * |
| | | * @param id |
| | | * 课件id |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 课件获取资源列表 |
| | | * |
| | | * |
| | | * @param dirId |
| | | * Ŀ¼Id |
| | | * @param limit |
| | |
| | | |
| | | /** |
| | | * 课件从资源选择后保存 |
| | | * |
| | | * |
| | | * @param resId |
| | | * 资源文件id |
| | | * @param sectionId |
| | | * 小节id |
| | | * |
| | | * |
| | | */ |
| | | @GetMapping(value = "saveCourseware4Res") |
| | | public Result saveCourseware4Res(String resId, String sectionId) { |
| | |
| | | result = lectureService.addLecture(sectionId, resId_); |
| | | successCount = result.isSuccess() ? 1 : 0; |
| | | } |
| | | lectureService.addLectureLoad(sectionId); |
| | | |
| | | return new Result(true, null, successCount); |
| | | } |
| | | |
| | | /** |
| | | * 获取练习成绩列表 |
| | | * |
| | | * |
| | | * @param subjectId |
| | | * 课程id |
| | | * @param exerciseId |
| | |
| | | * 每页显示几条 |
| | | * @param pageNum |
| | | * 页码 |
| | | * |
| | | * |
| | | */ |
| | | @GetMapping(value = "lstExerciseScore") |
| | | public Result lstExerciseScore(String subjectId, String exerciseId, Integer pageSize, Integer pageNum) { |
| | |
| | | |
| | | /** |
| | | * 练习成绩的导出 |
| | | * |
| | | * |
| | | * @param subjectId |
| | | * 课程id |
| | | * @param exerciseId练习id |