package com.gkhy.exam.admin.web; import com.gkhy.exam.common.annotation.Log; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.common.enums.BusinessType; import com.gkhy.exam.system.service.ExStudentStudyService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** *

* 课程学习学习日志表 前端控制器 *

* * @author kzy * @since 2024-06-06 13:53:17 */ @Api(tags = "学员学习记录前端控制器") @RestController @RequestMapping("/student-study") public class ExStudentStudyController { @Autowired private ExStudentStudyService studentStudyService; @ApiOperation(value = "根据批次id和学员id查询学习记录") @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "phaseId", dataType = "long", required = true, value = "批次Id"), @ApiImplicitParam(paramType = "query", name = "studentId", dataType = "long", required = true, value = "学员id") }) @GetMapping("/getStudentStudy") public CommonResult getStudentStudy(@RequestParam(required = true) Long phaseId, @RequestParam(required = true)Long studentId){ return CommonResult.success(studentStudyService.selectStudyByPhaseAndStundentId(phaseId,studentId)); } @Log(title = "课程学习记录管理", businessType = BusinessType.DELETE) @ApiOperation(value = "删除学习记录") @DeleteMapping(value = { "/{studyId}" }) public CommonResult delete(@PathVariable(value = "studyId", required = true) Long studyId){ return CommonResult.success(studentStudyService.deleteStudentStudyById(studyId)); } }