package com.huashe.park.core.service.impl;


import com.huashe.common.annotation.DataSource;
import com.huashe.common.enums.DataSourceType;
import com.huashe.park.core.mapper.BdFenceVioEvtMapper;
import com.huashe.park.core.service.IBdFenceVioEvtService;
import com.huashe.park.domain.entity.BdFenceVioEvt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 围栏闯禁事件Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-14
 */
@Service
@DataSource(DataSourceType.PKB)
public class BdFenceVioEvtServiceImpl implements IBdFenceVioEvtService
{
    @Autowired
    private BdFenceVioEvtMapper bdFenceVioEvtMapper;

    /**
     * 查询围栏闯禁事件
     *
     * @param id 围栏闯禁事件主键
     * @return 围栏闯禁事件
     */
    @Override
    public BdFenceVioEvt selectBdFenceVioEvtById(Long id)
    {
        return bdFenceVioEvtMapper.selectBdFenceVioEvtById(id);
    }

    /**
     * 查询围栏闯禁事件列表
     *
     * @param bdFenceVioEvt 围栏闯禁事件
     * @return 围栏闯禁事件
     */
    @Override
    public List<BdFenceVioEvt> selectBdFenceVioEvtList(BdFenceVioEvt bdFenceVioEvt)
    {
        return bdFenceVioEvtMapper.selectBdFenceVioEvtList(bdFenceVioEvt);
    }

    /**
     * 新增围栏闯禁事件
     *
     * @param bdFenceVioEvt 围栏闯禁事件
     * @return 结果
     */
    @Override
    public int insertBdFenceVioEvt(BdFenceVioEvt bdFenceVioEvt)
    {
        return bdFenceVioEvtMapper.insertBdFenceVioEvt(bdFenceVioEvt);
    }

    /**
     * 修改围栏闯禁事件
     *
     * @param bdFenceVioEvt 围栏闯禁事件
     * @return 结果
     */
    @Override
    public int updateBdFenceVioEvt(BdFenceVioEvt bdFenceVioEvt)
    {
        return bdFenceVioEvtMapper.updateBdFenceVioEvt(bdFenceVioEvt);
    }

    /**
     * 批量删除围栏闯禁事件
     *
     * @param ids 需要删除的围栏闯禁事件主键
     * @return 结果
     */
    @Override
    public int deleteBdFenceVioEvtByIds(Long[] ids)
    {
        return bdFenceVioEvtMapper.deleteBdFenceVioEvtByIds(ids);
    }

    /**
     * 删除围栏闯禁事件信息
     *
     * @param id 围栏闯禁事件主键
     * @return 结果
     */
    @Override
    public int deleteBdFenceVioEvtById(Long id)
    {
        return bdFenceVioEvtMapper.deleteBdFenceVioEvtById(id);
    }
}
