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.TTrainingrecordsMapper;
import com.ruoyi.project.training.domain.TTrainingrecords;
import com.ruoyi.project.training.service.ITTrainingrecordsService;

import javax.annotation.Resource;

/**
 * 培训成绩Service业务层处理
 *
 * @author ruoyi
 * @date 2020-12-02
 */
@Service
public class TTrainingrecordsServiceImpl implements ITTrainingrecordsService
{
    @Resource
    private TTrainingrecordsMapper tTrainingrecordsMapper;

    /**
     * 查询培训成绩
     *
     * @param id 培训成绩ID
     * @return 培训成绩
     */
    @Override
    public TTrainingrecords selectTTrainingrecordsById(Long id)
    {
        return tTrainingrecordsMapper.selectTTrainingrecordsById(id);
    }

    /**
     * 查询培训成绩列表
     *
     * @param tTrainingrecords 培训成绩
     * @return 培训成绩
     */
    @Override
    public List<TTrainingrecords> selectTTrainingrecordsList(TTrainingrecords tTrainingrecords)
    {
        return tTrainingrecordsMapper.selectTTrainingrecordsList(tTrainingrecords);
    }

    /**
     * 查询培训成绩列表
     *
     * @param tTrainingrecords 培训成绩
     * @return 培训成绩集合
     */
    @Override
    public List<TTrainingrecords> selectList(TTrainingrecords tTrainingrecords) {
        return tTrainingrecordsMapper.selectList(tTrainingrecords);
    }

    /**
     * 根据员工号查询培训成绩列表
     *
     * @param id 员工号
     * @return 培训成绩集合
     */
    @Override
    public TTrainingrecords selectTTrainingrecordsBystaffId(Long id) {
        return tTrainingrecordsMapper.selectTTrainingrecordsBystaffId(id);
    }

    /**
     * 新增培训成绩
     *
     * @param tTrainingrecords 培训成绩
     * @return 结果
     */
    @Override
    public int insertTTrainingrecords(TTrainingrecords tTrainingrecords)
    {
        return tTrainingrecordsMapper.insertTTrainingrecords(tTrainingrecords);
    }

    /**
     * 修改培训成绩
     *
     * @param tTrainingrecords 培训成绩
     * @return 结果
     */
    @Override
    public int updateTTrainingrecords(TTrainingrecords tTrainingrecords)
    {
        return tTrainingrecordsMapper.updateTTrainingrecords(tTrainingrecords);
    }

    /**
     * 批量删除培训成绩
     *
     * @param ids 需要删除的培训成绩ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingrecordsByIds(Long[] ids)
    {
        return tTrainingrecordsMapper.deleteTTrainingrecordsByIds(ids);
    }

    /**
     * 删除培训成绩信息
     *
     * @param id 培训成绩ID
     * @return 结果
     */
    @Override
    public int deleteTTrainingrecordsById(Long id)
    {
        return tTrainingrecordsMapper.deleteTTrainingrecordsById(id);
    }
}
