| | |
| | | |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.ExCourseChapter; |
| | |
| | | |
| | | @ApiOperation(value = "根据id获取课程章节信息") |
| | | @GetMapping(value = { "/{chapterId}" }) |
| | | public CommonResult getCompanyInfo(@PathVariable(value = "chapterId", required = true) Long chapterId) |
| | | public CommonResult getChapterInfo(@PathVariable(value = "chapterId", required = true) Long chapterId) |
| | | { |
| | | return CommonResult.success(courseChapterService.selectChapterById(chapterId)); |
| | | } |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "课程章节管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增章节") |
| | | @PostMapping |
| | |
| | | return CommonResult.success(courseChapterService.insertChapter(courseChapter)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "课程章节管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑章节") |
| | | @PutMapping |
| | |
| | | return CommonResult.success(courseChapterService.updateChapter(courseChapter)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "课程章节管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "删除章节") |
| | | @DeleteMapping(value = { "/{chapterId}" }) |
| | |
| | | @GetMapping(value = { "/getCourseChapter" }) |
| | | public CommonResult getCourseChapter(@RequestParam(required = true)Long courseId) |
| | | { |
| | | return CommonResult.success(courseChapterService.selectChapterByCourseId(courseId)); |
| | | return CommonResult.success(courseChapterService.selectChapterByCourseId(courseId,null)); |
| | | } |
| | | |
| | | @ApiOperation(value = "校验章节名称是否唯一") |