package com.srs.comprehensive.service.impl;

import java.util.List;

import com.srs.common.utils.DateUtils;
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.CphIdeologyScoreMapper;
import com.srs.comprehensive.domain.CphIdeologyScore;
import com.srs.comprehensive.service.ICphIdeologyScoreService;

/**
 * 思想品德初始分数Service业务层处理
 *
 * @author srs
 * @date 2024-07-01
 */
@Service
public class CphIdeologyScoreServiceImpl extends ServiceImpl<CphIdeologyScoreMapper,CphIdeologyScore> implements ICphIdeologyScoreService {
    @Autowired
    private CphIdeologyScoreMapper cphIdeologyScoreMapper;

    /**
     * 查询思想品德初始分数
     *
     * @param id 思想品德初始分数主键
     * @return 思想品德初始分数
     */
    @Override
    public CphIdeologyScore selectCphIdeologyScoreById(Long id) {
        return cphIdeologyScoreMapper.selectCphIdeologyScoreById(id);
    }

    /**
     * 查询思想品德初始分数列表
     *
     * @param cphIdeologyScore 思想品德初始分数
     * @return 思想品德初始分数
     */
    @Override
    public List<CphIdeologyScore> selectCphIdeologyScoreList(CphIdeologyScore cphIdeologyScore) {
        return cphIdeologyScoreMapper.selectCphIdeologyScoreList(cphIdeologyScore);
    }

    /**
     * 新增思想品德初始分数
     *
     * @param cphIdeologyScore 思想品德初始分数
     * @return 结果
     */
    @Override
    public int insertCphIdeologyScore(CphIdeologyScore cphIdeologyScore) {
                cphIdeologyScore.setCreateTime(DateUtils.getNowDate());
            return cphIdeologyScoreMapper.insertCphIdeologyScore(cphIdeologyScore);
    }

    /**
     * 修改思想品德初始分数
     *
     * @param cphIdeologyScore 思想品德初始分数
     * @return 结果
     */
    @Override
    public int updateCphIdeologyScore(CphIdeologyScore cphIdeologyScore) {
                cphIdeologyScore.setUpdateTime(DateUtils.getNowDate());
        return cphIdeologyScoreMapper.updateCphIdeologyScore(cphIdeologyScore);
    }

    /**
     * 批量删除思想品德初始分数
     *
     * @param ids 需要删除的思想品德初始分数主键
     * @return 结果
     */
    @Override
    public int deleteCphIdeologyScoreByIds(Long[] ids) {
        return cphIdeologyScoreMapper.deleteCphIdeologyScoreByIds(ids);
    }

    /**
     * 删除思想品德初始分数信息
     *
     * @param id 思想品德初始分数主键
     * @return 结果
     */
    @Override
    public int deleteCphIdeologyScoreById(Long id) {
        return cphIdeologyScoreMapper.deleteCphIdeologyScoreById(id);
    }
}
