package com.srs.comprehensive.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.srs.common.utils.DateUtils;
import com.srs.comprehensive.domain.Vo.CphClassGoodStuYear;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.CphClassGoodMapper;
import com.srs.comprehensive.domain.CphClassGood;
import com.srs.comprehensive.service.ICphClassGoodService;

/**
 * 优秀班级Service业务层处理
 *
 * @author srs
 * @date 2023-07-04
 */
@Service
public class CphClassGoodServiceImpl extends ServiceImpl<CphClassGoodMapper,CphClassGood> implements ICphClassGoodService
{
    @Autowired
    private CphClassGoodMapper cphClassGoodMapper;

    /**
     * 查询优秀班级
     *
     * @param id 优秀班级主键
     * @return 优秀班级
     */
    @Override
    public CphClassGood selectCphClassGoodById(Long id)
    {
        return cphClassGoodMapper.selectCphClassGoodById(id);
    }

    /**
     * 查询优秀班级列表
     *
     * @param cphClassGood 优秀班级
     * @return 优秀班级
     */
    @Override
    public List<CphClassGoodStuYear> selectCphClassGoodList(CphClassGood cphClassGood)
    {
        return cphClassGoodMapper.selectCphClassGoodList(cphClassGood);
    }

    /**
     * 新增优秀班级
     *
     * @param cphClassGood 优秀班级
     * @return 结果
     */
    @Override
    public int insertCphClassGood(CphClassGood cphClassGood)
    {
        cphClassGood.setCreateTime(DateUtils.getNowDate());
        return cphClassGoodMapper.insertCphClassGood(cphClassGood);
    }

    /**
     * 修改优秀班级
     *
     * @param cphClassGood 优秀班级
     * @return 结果
     */
    @Override
    public int updateCphClassGood(CphClassGood cphClassGood)
    {
        return cphClassGoodMapper.updateCphClassGood(cphClassGood);
    }

    /**
     * 批量删除优秀班级
     *
     * @param ids 需要删除的优秀班级主键
     * @return 结果
     */
    @Override
    public int deleteCphClassGoodByIds(Long[] ids)
    {
        return cphClassGoodMapper.deleteCphClassGoodByIds(ids);
    }

    /**
     * 删除优秀班级信息
     *
     * @param id 优秀班级主键
     * @return 结果
     */
    @Override
    public int deleteCphClassGoodById(Long id)
    {
        return cphClassGoodMapper.deleteCphClassGoodById(id);
    }
}
