package com.ruoyi.project.patrol.commonuse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.patrol.commonuse.mapper.TCommonuseWalkieTalkieMapper;
import com.ruoyi.project.patrol.commonuse.domain.TCommonuseWalkieTalkie;
import com.ruoyi.project.patrol.commonuse.service.ITCommonuseWalkieTalkieService;

/**
 * 对讲机Service业务层处理
 * 
 * @author admin
 * @date 2023-11-08
 */
@Service
public class TCommonuseWalkieTalkieServiceImpl implements ITCommonuseWalkieTalkieService 
{
    @Autowired
    private TCommonuseWalkieTalkieMapper tCommonuseWalkieTalkieMapper;

    /**
     * 查询对讲机
     * 
     * @param id 对讲机主键
     * @return 对讲机
     */
    @Override
    public TCommonuseWalkieTalkie selectTCommonuseWalkieTalkieById(Long id)
    {
        return tCommonuseWalkieTalkieMapper.selectTCommonuseWalkieTalkieById(id);
    }

    /**
     * 查询对讲机列表
     * 
     * @param tCommonuseWalkieTalkie 对讲机
     * @return 对讲机
     */
    @Override
    public List<TCommonuseWalkieTalkie> selectTCommonuseWalkieTalkieList(TCommonuseWalkieTalkie tCommonuseWalkieTalkie)
    {
        return tCommonuseWalkieTalkieMapper.selectTCommonuseWalkieTalkieList(tCommonuseWalkieTalkie);
    }

    /**
     * 新增对讲机
     * 
     * @param tCommonuseWalkieTalkie 对讲机
     * @return 结果
     */
    @Override
    public int insertTCommonuseWalkieTalkie(TCommonuseWalkieTalkie tCommonuseWalkieTalkie)
    {
        return tCommonuseWalkieTalkieMapper.insertTCommonuseWalkieTalkie(tCommonuseWalkieTalkie);
    }

    /**
     * 修改对讲机
     * 
     * @param tCommonuseWalkieTalkie 对讲机
     * @return 结果
     */
    @Override
    public int updateTCommonuseWalkieTalkie(TCommonuseWalkieTalkie tCommonuseWalkieTalkie)
    {
        return tCommonuseWalkieTalkieMapper.updateTCommonuseWalkieTalkie(tCommonuseWalkieTalkie);
    }

    /**
     * 批量删除对讲机
     * 
     * @param ids 需要删除的对讲机主键
     * @return 结果
     */
    @Override
    public int deleteTCommonuseWalkieTalkieByIds(Long[] ids)
    {
        return tCommonuseWalkieTalkieMapper.deleteTCommonuseWalkieTalkieByIds(ids);
    }

    /**
     * 删除对讲机信息
     * 
     * @param id 对讲机主键
     * @return 结果
     */
    @Override
    public int deleteTCommonuseWalkieTalkieById(Long id)
    {
        return tCommonuseWalkieTalkieMapper.deleteTCommonuseWalkieTalkieById(id);
    }
}
