package com.srs.comprehensive.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.CphScienceScoreMapper;
import com.srs.comprehensive.domain.CphScienceScore;
import com.srs.comprehensive.service.ICphScienceScoreService;

/**
 * 学生课程成绩Service业务层处理
 *
 * @author srs
 * @date 2024-03-14
 */
@Service
public class CphScienceScoreServiceImpl extends ServiceImpl<CphScienceScoreMapper,CphScienceScore> implements ICphScienceScoreService {
    @Autowired
    private CphScienceScoreMapper cphScienceScoreMapper;

    /**
     * 查询学生课程成绩
     *
     * @param id 学生课程成绩主键
     * @return 学生课程成绩
     */
    @Override
    public CphScienceScore selectCphScienceScoreById(Long id) {
        return cphScienceScoreMapper.selectCphScienceScoreById(id);
    }

    /**
     * 查询学生课程成绩列表
     *
     * @param cphScienceScore 学生课程成绩
     * @return 学生课程成绩
     */
    @Override
    public List<CphScienceScore> selectCphScienceScoreList(CphScienceScore cphScienceScore) {
        return cphScienceScoreMapper.selectCphScienceScoreList(cphScienceScore);
    }

    /**
     * 新增学生课程成绩
     *
     * @param cphScienceScore 学生课程成绩
     * @return 结果
     */
    @Override
    public int insertCphScienceScore(CphScienceScore cphScienceScore) {
            return cphScienceScoreMapper.insertCphScienceScore(cphScienceScore);
    }

    /**
     * 修改学生课程成绩
     *
     * @param cphScienceScore 学生课程成绩
     * @return 结果
     */
    @Override
    public int updateCphScienceScore(CphScienceScore cphScienceScore) {
        return cphScienceScoreMapper.updateCphScienceScore(cphScienceScore);
    }

    /**
     * 批量删除学生课程成绩
     *
     * @param ids 需要删除的学生课程成绩主键
     * @return 结果
     */
    @Override
    public int deleteCphScienceScoreByIds(Long[] ids) {
        return cphScienceScoreMapper.deleteCphScienceScoreByIds(ids);
    }

    /**
     * 删除学生课程成绩信息
     *
     * @param id 学生课程成绩主键
     * @return 结果
     */
    @Override
    public int deleteCphScienceScoreById(Long id) {
        return cphScienceScoreMapper.deleteCphScienceScoreById(id);
    }
}
