package com.zhongzheng.controller.recruit;

import com.zhongzheng.common.annotation.Log;
import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.domain.AjaxResult;
import com.zhongzheng.common.core.page.TableDataInfo;
import com.zhongzheng.common.enums.BusinessType;
import com.zhongzheng.modules.recruit.bo.RecruitCompanyAddBo;
import com.zhongzheng.modules.recruit.bo.RecruitCompanyEditBo;
import com.zhongzheng.modules.recruit.bo.RecruitCompanyQueryBo;
import com.zhongzheng.modules.recruit.bo.RecruitCompanyTradeQueryBo;
import com.zhongzheng.modules.recruit.service.IRecruitCompanyService;
import com.zhongzheng.modules.recruit.service.IRecruitCompanyTradeService;
import com.zhongzheng.modules.recruit.vo.RecruitCompanyNeedVo;
import com.zhongzheng.modules.recruit.vo.RecruitCompanyTradeVo;
import com.zhongzheng.modules.recruit.vo.RecruitCompanyVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * 公司管理列Controller
 * 
 * @author ruoyi
 * @date 2021-08-12
 */
@Api(value = "公司管理列控制器", tags = {"公司管理列管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/common/recruit/companyCon")
public class RecruitCompanyController extends BaseController {

    private final IRecruitCompanyService iRecruitCompanyService;


    private final IRecruitCompanyTradeService iRecruitCompanyTradeService;


    /**
     * 查询公司管理列列表
     */
    @ApiOperation("查询公司管理列列表")
    @GetMapping("/list")
    public TableDataInfo<RecruitCompanyNeedVo> list(RecruitCompanyQueryBo bo) {
        startPage();
        List<RecruitCompanyNeedVo> list = iRecruitCompanyService.queryNeedsList(bo);
        return getDataTable(list);
    }

    /**
     * 获取公司管理列详细信息
     */
    @ApiOperation("获取公司管理列详细信息")
    @GetMapping("/{companyId}")
    public AjaxResult<RecruitCompanyNeedVo> getInfo(@PathVariable("companyId" ) Long companyId) {
        return AjaxResult.success(iRecruitCompanyService.queryNeedsId(companyId));
    }


}
