package com.ruoyi.project.training.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.training.mapper.TTrainingDeviceMapper;
import com.ruoyi.project.training.domain.TTrainingDevice;
import com.ruoyi.project.training.service.ITTrainingDeviceService;

import javax.annotation.Resource;

/**
 * 人员-装置级培训关系Service业务层处理
 *
 * @author ruoyi
 * @date 2021-06-23
 */
@Service
public class TTrainingDeviceServiceImpl implements ITTrainingDeviceService
{
    @Resource
    private TTrainingDeviceMapper tTrainingDeviceMapper;

    /**
     * 查询人员-装置级培训关系
     *
     * @param id 人员-装置级培训关系ID
     * @return 人员-装置级培训关系
     */
    @Override
    public TTrainingDevice selectTTrainingDeviceById(Long id)
    {
        return tTrainingDeviceMapper.selectTTrainingDeviceById(id);
    }

    /**
     * 查询人员-装置级培训关系列表
     *
     * @param tTrainingDevice 人员-装置级培训关系
     * @return 人员-装置级培训关系
     */
    @Override
    public List<TTrainingDevice> selectTTrainingDeviceList(TTrainingDevice tTrainingDevice)
    {
        return tTrainingDeviceMapper.selectTTrainingDeviceList(tTrainingDevice);
    }

    /**
     * 新增人员-装置级培训关系
     *
     * @param tTrainingDevice 人员-装置级培训关系
     * @return 结果
     */
    @Override
    public int insertTTrainingDevice(TTrainingDevice tTrainingDevice)
    {
        return tTrainingDeviceMapper.insertTTrainingDevice(tTrainingDevice);
    }

    /**
     * 修改人员-装置级培训关系
     *
     * @param tTrainingDevice 人员-装置级培训关系
     * @return 结果
     */
    @Override
    public int updateTTrainingDevice(TTrainingDevice tTrainingDevice)
    {
        return tTrainingDeviceMapper.updateTTrainingDevice(tTrainingDevice);
    }

    /**
     * 批量删除人员-装置级培训关系
     *
     * @param ids 需要删除的人员-装置级培训关系ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingDeviceByIds(Long[] ids)
    {
        return tTrainingDeviceMapper.deleteTTrainingDeviceByIds(ids);
    }

    /**
     * 删除人员-装置级培训关系
     *
     * @param tTrainingDevice 人员-装置级培训关系
     * @return 结果
     */
    @Override
    public int deleteTTrainingDevice(TTrainingDevice tTrainingDevice) {
        return tTrainingDeviceMapper.deleteTTrainingDevice(tTrainingDevice);
    }

    /**
     * 删除人员-装置级培训关系信息
     *
     * @param id 人员-装置级培训关系ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingDeviceById(Long id)
    {
        return tTrainingDeviceMapper.deleteTTrainingDeviceById(id);
    }
}
