package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZyRecruitMapper;
import com.ruoyi.system.domain.ZyRecruit;
import com.ruoyi.system.service.IZyRecruitService;

/**
 * 人才招聘信息Service业务层处理
 * 
 * @author libao
 * @date 2024-05-24
 */
@Service
public class ZyRecruitServiceImpl implements IZyRecruitService 
{
    @Autowired
    private ZyRecruitMapper zyRecruitMapper;

    /**
     * 查询人才招聘信息
     * 
     * @param id 人才招聘信息主键
     * @return 人才招聘信息
     */
    @Override
    public ZyRecruit selectZyRecruitById(Long id)
    {
        return zyRecruitMapper.selectZyRecruitById(id);
    }

    /**
     * 查询人才招聘信息列表
     * 
     * @param zyRecruit 人才招聘信息
     * @return 人才招聘信息
     */
    @Override
    public List<ZyRecruit> selectZyRecruitList(ZyRecruit zyRecruit)
    {
        return zyRecruitMapper.selectZyRecruitList(zyRecruit);
    }

    /**
     * 新增人才招聘信息
     * 
     * @param zyRecruit 人才招聘信息
     * @return 结果
     */
    @Override
    public int insertZyRecruit(ZyRecruit zyRecruit)
    {
        zyRecruit.setCreateTime(DateUtils.getNowDate());
        return zyRecruitMapper.insertZyRecruit(zyRecruit);
    }

    /**
     * 修改人才招聘信息
     * 
     * @param zyRecruit 人才招聘信息
     * @return 结果
     */
    @Override
    public int updateZyRecruit(ZyRecruit zyRecruit)
    {
        zyRecruit.setUpdateTime(DateUtils.getNowDate());
        return zyRecruitMapper.updateZyRecruit(zyRecruit);
    }

    /**
     * 批量删除人才招聘信息
     * 
     * @param ids 需要删除的人才招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteZyRecruitByIds(Long[] ids)
    {
        return zyRecruitMapper.deleteZyRecruitByIds(ids);
    }

    /**
     * 删除人才招聘信息信息
     * 
     * @param id 人才招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteZyRecruitById(Long id)
    {
        return zyRecruitMapper.deleteZyRecruitById(id);
    }
}
