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.TEmergentPeopleMapper;
import com.ruoyi.system.domain.TEmergentPeople;
import com.ruoyi.system.service.ITEmergentPeopleService;

/**
 * 紧急联系人Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-25
 */
@Service
public class TEmergentPeopleServiceImpl implements ITEmergentPeopleService 
{
    @Autowired
    private TEmergentPeopleMapper tEmergentPeopleMapper;

    /**
     * 查询紧急联系人
     * 
     * @param id 紧急联系人主键
     * @return 紧急联系人
     */
    @Override
    public TEmergentPeople selectTEmergentPeopleById(Integer id)
    {
        return tEmergentPeopleMapper.selectTEmergentPeopleById(id);
    }

    /**
     * 查询紧急联系人列表
     * 
     * @param tEmergentPeople 紧急联系人
     * @return 紧急联系人
     */
    @Override
    public List<TEmergentPeople> selectTEmergentPeopleList(TEmergentPeople tEmergentPeople)
    {
        return tEmergentPeopleMapper.selectTEmergentPeopleList(tEmergentPeople);
    }

    /**
     * 新增紧急联系人
     * 
     * @param tEmergentPeople 紧急联系人
     * @return 结果
     */
    @Override
    public int insertTEmergentPeople(TEmergentPeople tEmergentPeople)
    {
        return tEmergentPeopleMapper.insertTEmergentPeople(tEmergentPeople);
    }

    /**
     * 修改紧急联系人
     * 
     * @param tEmergentPeople 紧急联系人
     * @return 结果
     */
    @Override
    public int updateTEmergentPeople(TEmergentPeople tEmergentPeople)
    {
        return tEmergentPeopleMapper.updateTEmergentPeople(tEmergentPeople);
    }

    /**
     * 批量删除紧急联系人
     * 
     * @param ids 需要删除的紧急联系人主键
     * @return 结果
     */
    @Override
    public int deleteTEmergentPeopleByIds(Integer[] ids)
    {
        return tEmergentPeopleMapper.deleteTEmergentPeopleByIds(ids);
    }

    /**
     * 删除紧急联系人信息
     * 
     * @param id 紧急联系人主键
     * @return 结果
     */
    @Override
    public int deleteTEmergentPeopleById(Integer id)
    {
        return tEmergentPeopleMapper.deleteTEmergentPeopleById(id);
    }
}
