package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdLeaveMapper;
import com.ruoyi.system.domain.TdLeave;
import com.ruoyi.system.service.ITdLeaveService;
import com.ruoyi.common.core.text.Convert;

/**
 * 人员离职Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-16
 */
@Service
public class TdLeaveServiceImpl implements ITdLeaveService 
{
    @Autowired
    private TdLeaveMapper tdLeaveMapper;

    /**
     * 查询人员离职
     * 
     * @param id 人员离职主键
     * @return 人员离职
     */
    @Override
    public TdLeave selectTdLeaveById(Long id)
    {
        return tdLeaveMapper.selectTdLeaveById(id);
    }

    /**
     * 查询人员离职列表
     * 
     * @param tdLeave 人员离职
     * @return 人员离职
     */
    @Override
    public List<TdLeave> selectTdLeaveList(TdLeave tdLeave)
    {
        return tdLeaveMapper.selectTdLeaveList(tdLeave);
    }

    /**
     * 新增人员离职
     * 
     * @param tdLeave 人员离职
     * @return 结果
     */
    @Override
    public int insertTdLeave(TdLeave tdLeave)
    {
        return tdLeaveMapper.insertTdLeave(tdLeave);
    }

    /**
     * 修改人员离职
     * 
     * @param tdLeave 人员离职
     * @return 结果
     */
    @Override
    public int updateTdLeave(TdLeave tdLeave)
    {
        return tdLeaveMapper.updateTdLeave(tdLeave);
    }

    /**
     * 批量删除人员离职
     * 
     * @param ids 需要删除的人员离职主键
     * @return 结果
     */
    @Override
    public int deleteTdLeaveByIds(String ids)
    {
        return tdLeaveMapper.deleteTdLeaveByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除人员离职信息
     * 
     * @param id 人员离职主键
     * @return 结果
     */
    @Override
    public int deleteTdLeaveById(Long id)
    {
        return tdLeaveMapper.deleteTdLeaveById(id);
    }
}
