package com.ztmap.project.zhny.device.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztmap.project.zhny.device.mapper.TDeviceMapper;
import com.ztmap.project.zhny.device.domain.TDevice;
import com.ztmap.project.zhny.device.service.ITDeviceService;
import com.ztmap.common.utils.text.Convert;

/**
 * 设备Service业务层处理
 * 
 * @author ztmap
 * @date 2023-11-16
 */
@Service
public class TDeviceServiceImpl implements ITDeviceService 
{
    @Autowired
    private TDeviceMapper tDeviceMapper;

    /**
     * 查询设备
     * 
     * @param id 设备ID
     * @return 设备
     */
    @Override
    public TDevice selectTDeviceById(Long id)
    {
        return tDeviceMapper.selectTDeviceById(id);
    }

    /**
     * 查询设备列表
     * 
     * @param tDevice 设备
     * @return 设备
     */
    @Override
    public List<TDevice> selectTDeviceList(TDevice tDevice)
    {
        return tDeviceMapper.selectTDeviceList(tDevice);
    }

    /**
     * 新增设备
     * 
     * @param tDevice 设备
     * @return 结果
     */
    @Override
    public int insertTDevice(TDevice tDevice)
    {
        return tDeviceMapper.insertTDevice(tDevice);
    }

    /**
     * 修改设备
     * 
     * @param tDevice 设备
     * @return 结果
     */
    @Override
    public int updateTDevice(TDevice tDevice)
    {
        return tDeviceMapper.updateTDevice(tDevice);
    }

    /**
     * 删除设备对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceByIds(String ids)
    {
        return tDeviceMapper.deleteTDeviceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备信息
     * 
     * @param id 设备ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceById(Long id)
    {
        return tDeviceMapper.deleteTDeviceById(id);
    }
}
