package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.member.MemberAssessmentInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MemberAssessmentInfoMapper;
import com.ruoyi.system.service.IMemberAssessmentInfoService;

/**
 * 委员考核分数Service业务层处理
 * 
 * @author boman
 * @date 2024-03-20
 */
@Service
public class MemberAssessmentInfoServiceImpl implements IMemberAssessmentInfoService 
{
    @Autowired
    private MemberAssessmentInfoMapper memberAssessmentInfoMapper;

    /**
     * 查询委员考核分数
     * 
     * @param memberAssessmentId 委员考核分数主键
     * @return 委员考核分数
     */
    @Override
    public MemberAssessmentInfo selectMemberAssessmentInfoByMemberAssessmentId(Long memberAssessmentId)
    {
        return memberAssessmentInfoMapper.selectMemberAssessmentInfoByMemberAssessmentId(memberAssessmentId);
    }

    /**
     * 查询委员考核分数列表
     * 
     * @param memberAssessmentInfo 委员考核分数
     * @return 委员考核分数
     */
    @Override
    public List<MemberAssessmentInfo> selectMemberAssessmentInfoList(MemberAssessmentInfo memberAssessmentInfo)
    {
        return memberAssessmentInfoMapper.selectMemberAssessmentInfoList(memberAssessmentInfo);
    }

    /**
     * 新增委员考核分数
     * 
     * @param memberAssessmentInfo 委员考核分数
     * @return 结果
     */
    @Override
    public int insertMemberAssessmentInfo(MemberAssessmentInfo memberAssessmentInfo)
    {
        memberAssessmentInfo.setCreateTime(DateUtils.getNowDate());
        return memberAssessmentInfoMapper.insertMemberAssessmentInfo(memberAssessmentInfo);
    }

    /**
     * 修改委员考核分数
     * 
     * @param memberAssessmentInfo 委员考核分数
     * @return 结果
     */
    @Override
    public int updateMemberAssessmentInfo(MemberAssessmentInfo memberAssessmentInfo)
    {
        memberAssessmentInfo.setUpdateTime(DateUtils.getNowDate());
        return memberAssessmentInfoMapper.updateMemberAssessmentInfo(memberAssessmentInfo);
    }

    /**
     * 批量删除委员考核分数
     * 
     * @param memberAssessmentIds 需要删除的委员考核分数主键
     * @return 结果
     */
    @Override
    public int deleteMemberAssessmentInfoByMemberAssessmentIds(Long[] memberAssessmentIds)
    {
        return memberAssessmentInfoMapper.deleteMemberAssessmentInfoByMemberAssessmentIds(memberAssessmentIds);
    }

    /**
     * 删除委员考核分数信息
     * 
     * @param memberAssessmentId 委员考核分数主键
     * @return 结果
     */
    @Override
    public int deleteMemberAssessmentInfoByMemberAssessmentId(Long memberAssessmentId)
    {
        return memberAssessmentInfoMapper.deleteMemberAssessmentInfoByMemberAssessmentId(memberAssessmentId);
    }
}
