package com.fidms.web.service.impl;

import java.util.List;

import com.fidms.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fidms.web.mapper.InfraredInputMapper;
import com.fidms.web.domain.InfraredInput;
import com.fidms.web.service.IInfraredInputService;

/**
 * 红外输入Service业务层处理
 * 
 * @author Allen
 * @date 2023-05-08
 */
@Service
public class InfraredInputServiceImpl implements IInfraredInputService 
{
    @Autowired
    private InfraredInputMapper infraredInputMapper;

    /**
     * 查询红外输入
     * 
     * @param id 红外输入主键
     * @return 红外输入
     */
    @Override
    public InfraredInput selectInfraredInputById(Long id)
    {
        return infraredInputMapper.selectInfraredInputById(id);
    }

    /**
     * 查询红外输入列表
     * 
     * @param infraredInput 红外输入
     * @return 红外输入
     */
    @Override
    public List<InfraredInput> selectInfraredInputList(InfraredInput infraredInput)
    {
        return infraredInputMapper.selectInfraredInputList(infraredInput);
    }

    /**
     * 新增红外输入
     * 
     * @param infraredInput 红外输入
     * @return 结果
     */
    @Override
    public int insertInfraredInput(InfraredInput infraredInput)
    {
        infraredInput.setCreateTime(DateUtils.getNowDate());
        infraredInput.setUpdateTime(DateUtils.getNowDate());
        return infraredInputMapper.insertInfraredInput(infraredInput);
    }

    /**
     * 修改红外输入
     * 
     * @param infraredInput 红外输入
     * @return 结果
     */
    @Override
    public int updateInfraredInput(InfraredInput infraredInput)
    {
        infraredInput.setUpdateTime(DateUtils.getNowDate());
        return infraredInputMapper.updateInfraredInput(infraredInput);
    }

    /**
     * 批量删除红外输入
     * 
     * @param ids 需要删除的红外输入主键
     * @return 结果
     */
    @Override
    public int deleteInfraredInputByIds(Long[] ids)
    {
        return infraredInputMapper.deleteInfraredInputByIds(ids);
    }

    /**
     * 删除红外输入信息
     * 
     * @param id 红外输入主键
     * @return 结果
     */
    @Override
    public int deleteInfraredInputById(Long id)
    {
        return infraredInputMapper.deleteInfraredInputById(id);
    }

    @Override
    public List getInfraredInputOption()
    {
        return infraredInputMapper.getInfraredInputOption();
    }
}
