package org.jeecg.modules.api.controller2;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.apiBean.PageBean;
import org.jeecg.modules.apiService.ExaminationService;
import org.jeecg.modules.employRedister.entity.EmployRedister;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="考证咨询相关接口")
@RestController
@RequestMapping("/employ/examination")
@Slf4j
public class ExaminationController {

    /******************************************************************************************************************/
    //工作信息
    @Resource
    private ExaminationService examinationService;
    /******************************************************************************************************************/

    //考证咨询-证书查询
    @ApiOperation(value="考证咨询-查询证书列表", notes="考证咨询-查询证书列表")
    @RequestMapping(value = "/queryCert", method = {RequestMethod.GET})
    public Result<?> queryCertList(PageBean pageBean){
        return examinationService.queryCertList(pageBean);
    }

    //考证咨询-证书详情
    @ApiOperation(value="考证咨询-根据id查询证书详情", notes="考证咨询-根据id查询证书详情")
    @RequestMapping(value = "/queryCertById", method = {RequestMethod.GET})
    public Result<?> queryCertById(String cerId){
        return examinationService.queryCertById(cerId);
    }

    //考证咨询-提交报名材料
    @ApiOperation(value="考证咨询-提交报名材料", notes="考证咨询-提交报名材料")
    @RequestMapping(value = "/addMaterial", method = {RequestMethod.POST})
    public Result<?> addMaterial(@RequestHeader("X-Access-Token") String token, EmployRedister employRedister){
        return examinationService.addMaterial(token, employRedister);
    }

}
