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



import com.dcsoft.system.consume.domain.ConsumeGroupUser;
import com.dcsoft.system.consume.mapper.ConsumeGroupUserMapper;
import com.dcsoft.system.consume.service.IConsumeGroupUserService;
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 ConsumeGroupUserServiceImpl implements IConsumeGroupUserService
{
    @Autowired
    private ConsumeGroupUserMapper consumeGroupUserMapper;

    /**
     * 查询考勤组人员
     *
     * @param groupId 考勤组人员主键
     * @return 考勤组人员
     */
    @Override
    public ConsumeGroupUser selectConsumeGroupUserByGroupId(Long groupId)
    {
        return consumeGroupUserMapper.selectConsumeGroupUserByGroupId(groupId);
    }

    /**
     * 查询考勤组人员列表
     *
     * @param consumeGroupUser 考勤组人员
     * @return 考勤组人员
     */
    @Override
    public List<ConsumeGroupUser> selectConsumeGroupUserList(ConsumeGroupUser consumeGroupUser)
    {
        return consumeGroupUserMapper.selectConsumeGroupUserList(consumeGroupUser);
    }

    /**
     * 新增考勤组人员
     *
     * @param consumeGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int insertConsumeGroupUser(ConsumeGroupUser consumeGroupUser)
    {
        return consumeGroupUserMapper.insertConsumeGroupUser(consumeGroupUser);
    }

    /**
     * 修改考勤组人员
     *
     * @param consumeGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int updateConsumeGroupUser(ConsumeGroupUser consumeGroupUser)
    {
        return consumeGroupUserMapper.updateConsumeGroupUser(consumeGroupUser);
    }

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

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

    @Override
    public int deleteConsumeGroupUserByUserId(Long userId) {
        return consumeGroupUserMapper.deleteConsumeGroupUserByUserId(userId);
    }
}
