package com.ruoyi.bd.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bd.mapper.BdDevcTrailMapper;
import com.ruoyi.bd.domain.BdDevcTrail;
import com.ruoyi.bd.service.IBdDevcTrailService;

/**
 * 设备轨迹Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-07
 */
@Service
public class BdDevcTrailServiceImpl implements IBdDevcTrailService 
{
    @Autowired
    private BdDevcTrailMapper bdDevcTrailMapper;

    /**
     * 查询设备轨迹
     * 
     * @param id 设备轨迹主键
     * @return 设备轨迹
     */
    @Override
    public BdDevcTrail selectBdDevcTrailById(Long id)
    {
        return bdDevcTrailMapper.selectBdDevcTrailById(id);
    }

    /**
     * 查询设备轨迹列表
     * 
     * @param bdDevcTrail 设备轨迹
     * @return 设备轨迹
     */
    @Override
    public List<BdDevcTrail> selectBdDevcTrailList(BdDevcTrail bdDevcTrail)
    {
        return bdDevcTrailMapper.selectBdDevcTrailList(bdDevcTrail);
    }

    /**
     * 新增设备轨迹
     * 
     * @param bdDevcTrail 设备轨迹
     * @return 结果
     */
    @Override
    public int insertBdDevcTrail(BdDevcTrail bdDevcTrail)
    {
        bdDevcTrail.setCreateTime(DateUtils.getNowDate());
        return bdDevcTrailMapper.insertBdDevcTrail(bdDevcTrail);
    }

    /**
     * 修改设备轨迹
     * 
     * @param bdDevcTrail 设备轨迹
     * @return 结果
     */
    @Override
    public int updateBdDevcTrail(BdDevcTrail bdDevcTrail)
    {
        bdDevcTrail.setUpdateTime(DateUtils.getNowDate());
        return bdDevcTrailMapper.updateBdDevcTrail(bdDevcTrail);
    }

    /**
     * 批量删除设备轨迹
     * 
     * @param ids 需要删除的设备轨迹主键
     * @return 结果
     */
    @Override
    public int deleteBdDevcTrailByIds(Long[] ids)
    {
        return bdDevcTrailMapper.deleteBdDevcTrailByIds(ids);
    }

    /**
     * 删除设备轨迹信息
     * 
     * @param id 设备轨迹主键
     * @return 结果
     */
    @Override
    public int deleteBdDevcTrailById(Long id)
    {
        return bdDevcTrailMapper.deleteBdDevcTrailById(id);
    }
}
