heheng
6 天以前 d8012ee77b6a9e86611aae9074d5925826f4210d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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));
    }
}