package com.ruoyi.cms.service.impl;

import java.util.List;
import java.util.Arrays;

import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.FairCompanyMapper;
import com.ruoyi.cms.domain.FairCompany;
import com.ruoyi.cms.service.IFairCompanyService;

/**
 * 公司招聘会关联Service业务层处理
 *
 * @author lishundong
 * @date 2024-09-04
 */
@Service
public class FairCompanyServiceImpl extends ServiceImpl<FairCompanyMapper,FairCompany> implements IFairCompanyService
{
    @Autowired
    private FairCompanyMapper fairCompanyMapper;

    /**
     * 查询公司招聘会关联
     *
     * @param id 公司招聘会关联主键
     * @return 公司招聘会关联
     */
    @Override
    public FairCompany selectFairCompanyById(Long id)
    {
        return fairCompanyMapper.selectById(id);
    }

    /**
     * 查询公司招聘会关联列表
     *
     * @param fairCompany 公司招聘会关联
     * @return 公司招聘会关联
     */
    @Override
    public List<FairCompany> selectFairCompanyList(FairCompany fairCompany)
    {
        return fairCompanyMapper.selectFairCompanyList(fairCompany);
    }

    /**
     * 新增公司招聘会关联
     *
     * @param fairCompany 公司招聘会关联
     * @return 结果
     */
    @Override
    public int insertFairCompany(FairCompany fairCompany)
    {
        return fairCompanyMapper.insert(fairCompany);
    }

    /**
     * 修改公司招聘会关联
     *
     * @param fairCompany 公司招聘会关联
     * @return 结果
     */
    @Override
    public int updateFairCompany(FairCompany fairCompany)
    {
        return fairCompanyMapper.updateById(fairCompany);
    }

    /**
     * 批量删除公司招聘会关联
     *
     * @param ids 需要删除的公司招聘会关联主键
     * @return 结果
     */
    @Override
    public int deleteFairCompanyByIds(Long[] ids)
    {
        return fairCompanyMapper.deleteBatchIds(Arrays.asList(ids));
    }

}
