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.CourseTableTimeMapper;
import com.ruoyi.system.domain.CourseTableTime;
import com.ruoyi.system.service.ICourseTableTimeService;

/**
 * 课程-时间Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-24
 */
@Service
public class CourseTableTimeServiceImpl implements ICourseTableTimeService 
{
    @Autowired
    private CourseTableTimeMapper courseTableTimeMapper;

    /**
     * 查询课程-时间
     * 
     * @param id 课程-时间主键
     * @return 课程-时间
     */
    @Override
    public CourseTableTime selectCourseTableTimeById(Long id)
    {
        return courseTableTimeMapper.selectCourseTableTimeById(id);
    }

    /**
     * 查询课程-时间列表
     * 
     * @param courseTableTime 课程-时间
     * @return 课程-时间
     */
    @Override
    public List<CourseTableTime> selectCourseTableTimeList(CourseTableTime courseTableTime)
    {
        return courseTableTimeMapper.selectCourseTableTimeList(courseTableTime);
    }

    /**
     * 新增课程-时间
     * 
     * @param courseTableTime 课程-时间
     * @return 结果
     */
    @Override
    public int insertCourseTableTime(CourseTableTime courseTableTime)
    {
        courseTableTime.setCreateTime(DateUtils.getNowDate());
        return courseTableTimeMapper.insertCourseTableTime(courseTableTime);
    }

    /**
     * 修改课程-时间
     * 
     * @param courseTableTime 课程-时间
     * @return 结果
     */
    @Override
    public int updateCourseTableTime(CourseTableTime courseTableTime)
    {
        courseTableTime.setUpdateTime(DateUtils.getNowDate());
        return courseTableTimeMapper.updateCourseTableTime(courseTableTime);
    }

    /**
     * 批量删除课程-时间
     * 
     * @param ids 需要删除的课程-时间主键
     * @return 结果
     */
    @Override
    public int deleteCourseTableTimeByIds(Long[] ids)
    {
        return courseTableTimeMapper.deleteCourseTableTimeByIds(ids);
    }

    /**
     * 删除课程-时间信息
     * 
     * @param id 课程-时间主键
     * @return 结果
     */
    @Override
    public int deleteCourseTableTimeById(Long id)
    {
        return courseTableTimeMapper.deleteCourseTableTimeById(id);
    }
}
