package com.keao.edu.user.controller;

import com.keao.edu.common.controller.BaseController;
import com.keao.edu.common.entity.HttpResponseResult;
import com.keao.edu.common.page.PageInfo;
import com.keao.edu.common.page.QueryInfo;
import com.keao.edu.user.dto.ExamCertificationDto;
import com.keao.edu.user.entity.ExamCertification;
import com.keao.edu.user.entity.ExamLocation;
import com.keao.edu.user.page.ExamCertificationQueryInfo;
import com.keao.edu.user.service.ExamCertificationService;
import com.keao.edu.user.service.ExamLocationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("examCertification")
@Api(tags = "准考证服务")
public class ExamCertificationController extends BaseController {

    @Autowired
    private ExamCertificationService examCertificationService;

    @ApiOperation("获取学员准考证详情")
    @GetMapping(value = "findByStuAndBasicId")
    public HttpResponseResult<ExamCertification> findByStuAndBasicId(Integer studentId,Integer basicId) {
        return succeed(examCertificationService.findByStuAndBasicId(studentId,basicId));
    }

    @ApiOperation("获取学员准考证列表")
    @GetMapping(value = "queryCertificationPage")
    public HttpResponseResult<PageInfo<ExamCertificationDto>> queryCertificationPage(ExamCertificationQueryInfo queryInfo) {
        return succeed(examCertificationService.queryCertificationPage(queryInfo));
    }
}
