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

import com.ruoyi.project.training.domain.TTrainingRegular;
import com.ruoyi.project.training.mapper.TTrainingRegularMapper;
import com.ruoyi.project.training.service.ITTrainingRegularService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 装置培训计划Service业务层处理
 *
 * @author ruoyi
 * @date 2021-06-22
 */
@Service
public class TTrainingRegularServiceImpl implements ITTrainingRegularService
{
    @Resource
    private TTrainingRegularMapper tTrainingRegularMapper;

    /**
     * 查询装置培训计划
     *
     * @param id 装置培训计划ID
     * @return 装置培训计划
     */
    @Override
    public TTrainingRegular selectTTrainingRegularById(Long id)
    {
        return tTrainingRegularMapper.selectTTrainingRegularById(id);
    }

    /**
     * 查询装置培训计划列表
     *
     * @param tTrainingRegular 装置培训计划
     * @return 装置培训计划
     */
    @Override
    public List<TTrainingRegular> selectTTrainingRegularList(TTrainingRegular tTrainingRegular)
    {
        return tTrainingRegularMapper.selectTTrainingRegularList(tTrainingRegular);
    }

    @Override
    public List<TTrainingRegular> selectTTrainingRegularByPlanDate(TTrainingRegular tTrainingRegular)
    {
        return tTrainingRegularMapper.selectTTrainingRegularByPlanDate(tTrainingRegular);
    }

    /**
     * 新增装置培训计划
     *
     * @param tTrainingRegular 装置培训计划
     * @return 结果
     */
    @Override
    public int insertTTrainingRegular(TTrainingRegular tTrainingRegular)
    {
        return tTrainingRegularMapper.insertTTrainingRegular(tTrainingRegular);
    }

    /**
     * 修改装置培训计划
     *
     * @param tTrainingRegular 装置培训计划
     * @return 结果
     */
    @Override
    public int updateTTrainingRegular(TTrainingRegular tTrainingRegular)
    {
        return tTrainingRegularMapper.updateTTrainingRegular(tTrainingRegular);
    }

    /**
     * 批量删除装置培训计划
     *
     * @param ids 需要删除的装置培训计划ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingRegularByIds(Long[] ids)
    {
        return tTrainingRegularMapper.deleteTTrainingRegularByIds(ids);
    }

    /**
     * 删除装置培训计划信息
     *
     * @param id 装置培训计划ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingRegularById(Long id)
    {
        return tTrainingRegularMapper.deleteTTrainingRegularById(id);
    }
}
