package com.gkhy.exam.admin.controller.web;
|
|
|
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.constant.UserConstant;
|
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.*;
|
|
/**
|
* <p>
|
* 课程学习学习日志表 前端控制器
|
* </p>
|
*
|
* @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, UserConstant.ENABLE));
|
}
|
|
|
@RepeatSubmit
|
@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));
|
}
|
}
|