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


import com.dcsoft.system.kq.domain.KqGroupUser;
import com.dcsoft.system.kq.mapper.KqGroupUserMapper;
import com.dcsoft.system.kq.service.IKqGroupUserService;
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 KqGroupUserServiceImpl implements IKqGroupUserService
{
    @Autowired
    private KqGroupUserMapper kqGroupUserMapper;

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

    /**
     * 查询考勤组人员列表
     *
     * @param kqGroupUser 考勤组人员
     * @return 考勤组人员
     */
    @Override
    public List<KqGroupUser> selectKqGroupUserList(KqGroupUser kqGroupUser)
    {
        return kqGroupUserMapper.selectKqGroupUserList(kqGroupUser);
    }

    /**
     * 新增考勤组人员
     *
     * @param kqGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int insertKqGroupUser(KqGroupUser kqGroupUser)
    {
        return kqGroupUserMapper.insertKqGroupUser(kqGroupUser);
    }

    /**
     * 修改考勤组人员
     *
     * @param kqGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int updateKqGroupUser(KqGroupUser kqGroupUser)
    {
        return kqGroupUserMapper.updateKqGroupUser(kqGroupUser);
    }

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

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

    @Override
    public int deleteKqGroupUserByUserId(Long userId) {
        return kqGroupUserMapper.deleteKqGroupUserByUserId(userId);
    }
}
