package com.ruoyi.system.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.system.mapper.TRailSolveMapper;
import com.ruoyi.system.domain.TRailSolve;
import com.ruoyi.system.service.ITRailSolveService;

/**
 * 围栏告警处理Service业务层处理
 * 
 * @author zhengjie
 * @date 2023-09-09
 */
@Service
public class TRailSolveServiceImpl implements ITRailSolveService 
{
    @Autowired
    private TRailSolveMapper tRailSolveMapper;

    /**
     * 查询围栏告警处理
     * 
     * @param id 围栏告警处理主键
     * @return 围栏告警处理
     */
    @Override
    public TRailSolve selectTRailSolveById(Integer id)
    {
        return tRailSolveMapper.selectTRailSolveById(id);
    }

    /**
     * 查询围栏告警处理列表
     * 
     * @param tRailSolve 围栏告警处理
     * @return 围栏告警处理
     */
    @Override
    public List<TRailSolve> selectTRailSolveList(TRailSolve tRailSolve)
    {
        return tRailSolveMapper.selectTRailSolveList(tRailSolve);
    }

    /**
     * 新增围栏告警处理
     * 
     * @param tRailSolve 围栏告警处理
     * @return 结果
     */
    @Override
    public int insertTRailSolve(TRailSolve tRailSolve)
    {
        tRailSolve.setCreateTime(DateUtils.getNowDate());
        return tRailSolveMapper.insertTRailSolve(tRailSolve);
    }

    /**
     * 修改围栏告警处理
     * 
     * @param tRailSolve 围栏告警处理
     * @return 结果
     */
    @Override
    public int updateTRailSolve(TRailSolve tRailSolve)
    {
        return tRailSolveMapper.updateTRailSolve(tRailSolve);
    }

    /**
     * 批量删除围栏告警处理
     * 
     * @param ids 需要删除的围栏告警处理主键
     * @return 结果
     */
    @Override
    public int deleteTRailSolveByIds(Integer[] ids)
    {
        return tRailSolveMapper.deleteTRailSolveByIds(ids);
    }

    /**
     * 删除围栏告警处理信息
     * 
     * @param id 围栏告警处理主键
     * @return 结果
     */
    @Override
    public int deleteTRailSolveById(Integer id)
    {
        return tRailSolveMapper.deleteTRailSolveById(id);
    }
}
