package com.ruoyi.care.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.care.mapper.CareScoresMapper;
import com.ruoyi.care.domain.CareScores;
import com.ruoyi.care.service.ICareScoresService;

/**
 * 业务评分Service业务层处理
 * 
 * @author qy
 * @date 2024-11-26
 */
@Service
public class CareScoresServiceImpl implements ICareScoresService 
{
    @Autowired
    private CareScoresMapper careScoresMapper;

    /**
     * 查询业务评分
     * 
     * @param scoreId 业务评分主键
     * @return 业务评分
     */
    @Override
    public CareScores selectCareScoresByScoreId(Long scoreId)
    {
        return careScoresMapper.selectCareScoresByScoreId(scoreId);
    }

    /**
     * 查询业务评分列表
     * 
     * @param careScores 业务评分
     * @return 业务评分
     */
    @Override
    public List<CareScores> selectCareScoresList(CareScores careScores)
    {
        return careScoresMapper.selectCareScoresList(careScores);
    }

    /**
     * 新增业务评分
     * 
     * @param careScores 业务评分
     * @return 结果
     */
    @Override
    public int insertCareScores(CareScores careScores)
    {
        careScores.setCreateTime(DateUtils.getNowDate());
        return careScoresMapper.insertCareScores(careScores);
    }

    /**
     * 修改业务评分
     * 
     * @param careScores 业务评分
     * @return 结果
     */
    @Override
    public int updateCareScores(CareScores careScores)
    {
        careScores.setUpdateTime(DateUtils.getNowDate());
        return careScoresMapper.updateCareScores(careScores);
    }

    /**
     * 批量删除业务评分
     * 
     * @param scoreIds 需要删除的业务评分主键
     * @return 结果
     */
    @Override
    public int deleteCareScoresByScoreIds(Long[] scoreIds)
    {
        return careScoresMapper.deleteCareScoresByScoreIds(scoreIds);
    }

    /**
     * 删除业务评分信息
     * 
     * @param scoreId 业务评分主键
     * @return 结果
     */
    @Override
    public int deleteCareScoresByScoreId(Long scoreId)
    {
        return careScoresMapper.deleteCareScoresByScoreId(scoreId);
    }
}
