“djh”
5 天以前 7acaebcb01438578ded72491f39105db893982ef
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
51
package com.gkhy.exam.admin.controller.app;
 
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.ExPhaseStudent;
import com.gkhy.exam.system.service.ExPhaseStudentService;
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.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * <p>
 * 课时批次与学员关系表 前端控制器
 * </p>
 *
 * @author kzy
 * @since 2024-06-06 13:53:17
 */
@Api(tags = "APP批次与学员关系前端控制器")
@RestController
@RequestMapping("/app/phase-student")
public class AppPhaseStudentController {
    @Autowired
    private ExPhaseStudentService phaseStudentService;
 
    @PreAuthorize("hasAnyAuthority('train:exam:student')")
    @ApiOperation(value = "分页获取学员的批次列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10")
    })
    @GetMapping("/list")
    public CommonResult list(ExPhaseStudent phaseStudent){
        return CommonResult.success(phaseStudentService.selectPhaseStudentListForStudent(phaseStudent));
    }
 
    @PreAuthorize("hasAnyAuthority('train:exam:student')")
    @ApiOperation(value = "根据id查询学员批次信息")
    @GetMapping(value = { "/getPhaseStudentById" })
    public CommonResult getPhaseStudentById(@RequestParam(value = "phaseStudentId", required = true) Long phaseStudentId)
    {
        return CommonResult.success(phaseStudentService.getPhaseStudentById(phaseStudentId));
    }
}