package com.ruoyi.hezhi.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.hezhi.domain.TbContinuingEducationClass;
import com.ruoyi.hezhi.mapper.TbContinuingEducationClassMapper;
import com.ruoyi.hezhi.service.ITbContinuingEducationClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 继续教育分类Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-23
 */
@Service
public class TbContinuingEducationClassServiceImpl implements ITbContinuingEducationClassService
{
    @Autowired
    private TbContinuingEducationClassMapper tbContinuingEducationClassMapper;

    /**
     * 查询继续教育分类
     *
     * @param continuingEducationClassId 继续教育分类主键
     * @return 继续教育分类
     */
    @Override
    public TbContinuingEducationClass selectTbContinuingEducationClassByContinuingEducationClassId(Long continuingEducationClassId)
    {
        return tbContinuingEducationClassMapper.selectTbContinuingEducationClassByContinuingEducationClassId(continuingEducationClassId);
    }

    /**
     * 查询继续教育分类列表
     *
     * @param tbContinuingEducationClass 继续教育分类
     * @return 继续教育分类
     */
    @Override
    public List<TbContinuingEducationClass> selectTbContinuingEducationClassList(TbContinuingEducationClass tbContinuingEducationClass)
    {
        return tbContinuingEducationClassMapper.selectTbContinuingEducationClassList(tbContinuingEducationClass);
    }

    /**
     * 查询继续教育分类列表
     *
     * @return 继续教育分类
     */
    @Override
    public List<TbContinuingEducationClass> getAllContinuingEducationClassList()
    {
        return tbContinuingEducationClassMapper.getAllContinuingEducationClassList();
    }

    /**
     * 新增继续教育分类
     *
     * @param tbContinuingEducationClass 继续教育分类
     * @return 结果
     */
    @Override
    public int insertTbContinuingEducationClass(TbContinuingEducationClass tbContinuingEducationClass)
    {
        tbContinuingEducationClass.setCreateTime(DateUtils.getNowDate());
        return tbContinuingEducationClassMapper.insertTbContinuingEducationClass(tbContinuingEducationClass);
    }

    /**
     * 修改继续教育分类
     *
     * @param tbContinuingEducationClass 继续教育分类
     * @return 结果
     */
    @Override
    public int updateTbContinuingEducationClass(TbContinuingEducationClass tbContinuingEducationClass)
    {
        tbContinuingEducationClass.setUpdateTime(DateUtils.getNowDate());
        return tbContinuingEducationClassMapper.updateTbContinuingEducationClass(tbContinuingEducationClass);
    }

    /**
     * 批量删除继续教育分类
     *
     * @param continuingEducationClassIds 需要删除的继续教育分类主键
     * @return 结果
     */
    @Override
    public int deleteTbContinuingEducationClassByContinuingEducationClassIds(Long[] continuingEducationClassIds)
    {
        return tbContinuingEducationClassMapper.deleteTbContinuingEducationClassByContinuingEducationClassIds(continuingEducationClassIds);
    }

    /**
     * 删除继续教育分类信息
     *
     * @param continuingEducationClassId 继续教育分类主键
     * @return 结果
     */
    @Override
    public int deleteTbContinuingEducationClassByContinuingEducationClassId(Long continuingEducationClassId)
    {
        return tbContinuingEducationClassMapper.deleteTbContinuingEducationClassByContinuingEducationClassId(continuingEducationClassId);
    }

    /**
     * 继续教育分类列表
     *
     * @param params 参数
     * @return 继续教育分类列表
     */
    @Override
    public List<Map<String, Object>> getContinuingEducationClassMapList(Map<String, Object> params) {
        return tbContinuingEducationClassMapper.getContinuingEducationClassMapList(params);
    }

    /**
     * 继续教育列表
     *
     * @param params 参数
     * @return 继续教育列表
     */
    @Override
    public List<Map<String, Object>> getContinuingEducationList(Map<String, Object> params) {
        return tbContinuingEducationClassMapper.getContinuingEducationList(params);
    }
}
