package com.zehong.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDetectorInfoMapper;
import com.zehong.system.domain.TDetectorInfo;
import com.zehong.system.service.ITDetectorInfoService;
import com.github.pagehelper.PageInfo;

/**
 * 探测器Service业务层处理
 * 
 * @author zehong
 * @date 2021-11-02
 */
@Service
public class TDetectorInfoServiceImpl implements ITDetectorInfoService 
{
    @Autowired
    private TDetectorInfoMapper tDetectorInfoMapper;

    /**
     * 查询探测器
     * 
     * @param detectorId 探测器ID
     * @return 探测器
     */
    @Override
    public TDetectorInfo selectTDetectorInfoById(Long detectorId)
    {
        return tDetectorInfoMapper.selectTDetectorInfoById(detectorId);
    }

    /**
     * 查询探测器列表
     * 
     * @param tDetectorInfo 探测器
     * @return 探测器
     */
    @Override
    public List<TDetectorInfo> selectTDetectorInfoList(TDetectorInfo tDetectorInfo)
    {
        return tDetectorInfoMapper.selectTDetectorInfoList(tDetectorInfo);
    }

    /**
     * 查询探测器分页列表
     *
     * @param tDetectorInfo 探测器
     * @return 探测器
     */
    @Override
    public PageInfo<TDetectorInfo> selectTDetectorInfoPage(TDetectorInfo tDetectorInfo)
    {
        return new PageInfo(tDetectorInfoMapper.selectTDetectorInfoList(tDetectorInfo));
    }

    /**
     * 新增探测器
     * 
     * @param tDetectorInfo 探测器
     * @return 结果
     */
    @Override
    public int insertTDetectorInfo(TDetectorInfo tDetectorInfo)
    {
        return tDetectorInfoMapper.insertTDetectorInfo(tDetectorInfo);
    }

    /**
     * 修改探测器
     * 
     * @param tDetectorInfo 探测器
     * @return 结果
     */
    @Override
    public int updateTDetectorInfo(TDetectorInfo tDetectorInfo)
    {
        return tDetectorInfoMapper.updateTDetectorInfo(tDetectorInfo);
    }

    /**
     * 批量删除探测器
     * 
     * @param detectorIds 需要删除的探测器ID
     * @return 结果
     */
    @Override
    public int deleteTDetectorInfoByIds(Long[] detectorIds)
    {
        return tDetectorInfoMapper.deleteTDetectorInfoByIds(detectorIds);
    }

    /**
     * 删除探测器信息
     * 
     * @param detectorId 探测器ID
     * @return 结果
     */
    @Override
    public int deleteTDetectorInfoById(Long detectorId)
    {
        return tDetectorInfoMapper.deleteTDetectorInfoById(detectorId);
    }
}
