package org.jeecg.modules.api.employController;

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.ResumeService;
import org.jeecg.modules.apiService.SeekService;
import org.jeecg.modules.employSeek.entity.EmploySeek;
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/seek")
@Slf4j
public class SeekController {

    //求职信息
    @Resource
    private SeekService seekService;

    //求职信息-查询求职信息列表
    @ApiOperation(value="求职信息-查询求职信息列表", notes="求职信息-查询求职信息列表")
    @RequestMapping(value = "/querySeekList", method = {RequestMethod.GET})
    public Result<?> querySeekList(EmploySeek employSeek, PageBean pageBean){
        return seekService.querySeekList(employSeek, pageBean);
    }

    //求职信息-根据Id查看求职详情
    @ApiOperation(value="求职信息-根据Id查看求职详情", notes="求职信息-根据Id查看求职详情")
    @RequestMapping(value = "/querySeekById", method = {RequestMethod.GET})
    public Result<?> querySeekById(@RequestHeader("X-Access-Token")String token, String id){
        return seekService.querySeekById(token, id);
    }

    //求职信息-添加求职信息
    @ApiOperation(value="求职信息-添加求职信息", notes="求职信息-添加求职信息")
    @RequestMapping(value = "/addSeek", method = {RequestMethod.POST})
    public Result<?> addSeek(@RequestHeader("X-Access-Token")String token, EmploySeek employSeek){
        return seekService.addSeek(token, employSeek);
    }

    //求职信息-修改求职信息
    @ApiOperation(value="求职信息-修改求职信息", notes="求职信息-修改求职信息")
    @RequestMapping(value = "/updateSeek", method = {RequestMethod.POST})
    public Result<?> updateSeek(@RequestHeader("X-Access-Token") String token, EmploySeek employSeek){
        return seekService.updateSeek(token, employSeek);
    }

    //求职信息-我的求职
    @ApiOperation(value="求职信息-我的求职", notes="求职信息-我的求职")
    @RequestMapping(value = "/queryMySeekList", method = {RequestMethod.GET})
    public Result<?> queryMySeekList(@RequestHeader("X-Access-Token")String token, EmploySeek employSeek, PageBean pageBean){
        return seekService.queryMySeekList(token, employSeek, pageBean);
    }






}
