package com.dcsoft.system.consume.service.impl;



import com.dcsoft.system.consume.domain.ConsumeReportUser;
import com.dcsoft.system.consume.mapper.ConsumeReportUserMapper;
import com.dcsoft.system.consume.service.IConsumeReportUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考勤组人员Service业务层处理
 *
 * @author dcsoft
 * @date 2023-01-11
 */
@Service
public class ConsumeReportUserServiceImpl implements IConsumeReportUserService
{
    @Autowired
    private ConsumeReportUserMapper consumeReportUserMapper;

    /**
     * 查询考勤组人员
     *
     * @param reportId 考勤组人员主键
     * @return 考勤组人员
     */
    @Override
    public ConsumeReportUser selectConsumeReportUserByReportId(Long reportId)
    {
        return consumeReportUserMapper.selectConsumeReportUserByReportId(reportId);
    }

    /**
     * 查询考勤组人员列表
     *
     * @param consumeReportUser 考勤组人员
     * @return 考勤组人员
     */
    @Override
    public List<ConsumeReportUser> selectConsumeReportUserList(ConsumeReportUser consumeReportUser)
    {
        return consumeReportUserMapper.selectConsumeReportUserList(consumeReportUser);
    }

    /**
     * 新增考勤组人员
     *
     * @param consumeReportUser 考勤组人员
     * @return 结果
     */
    @Override
    public int insertConsumeReportUser(ConsumeReportUser consumeReportUser)
    {
        return consumeReportUserMapper.insertConsumeReportUser(consumeReportUser);
    }

    /**
     * 修改考勤组人员
     *
     * @param consumeReportUser 考勤组人员
     * @return 结果
     */
    @Override
    public int updateConsumeReportUser(ConsumeReportUser consumeReportUser)
    {
        return consumeReportUserMapper.updateConsumeReportUser(consumeReportUser);
    }

    /**
     * 批量删除考勤组人员
     *
     * @param reportIds 需要删除的考勤组人员主键
     * @return 结果
     */
    @Override
    public int deleteConsumeReportUserByReportIds(Long[] reportIds)
    {
        return consumeReportUserMapper.deleteConsumeReportUserByReportIds(reportIds);
    }

    /**
     * 删除考勤组人员信息
     *
     * @param reportId 考勤组人员主键
     * @return 结果
     */
    @Override
    public int deleteConsumeReportUserByReportId(Long reportId)
    {
        return consumeReportUserMapper.deleteConsumeReportUserByReportId(reportId);
    }

    @Override
    public int deleteConsumeReportUserByUserId(Long userId) {
        return consumeReportUserMapper.deleteConsumeReportUserByUserId(userId);
    }
}
