package com.huashe.park.core.service.impl;

import com.huashe.common.annotation.DataSource;
import com.huashe.common.enums.DataSourceType;
import com.huashe.park.core.mapper.ParkAttendGroupUsrMapper;
import com.huashe.park.core.service.IParkAttendGroupUsrService;
import com.huashe.park.domain.entity.ParkAttendGroupUsr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考勤组人员Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-08
 */
@Service
@DataSource(DataSourceType.PKB)
public class ParkAttendGroupUsrServiceImpl implements IParkAttendGroupUsrService {
    @Autowired
    private ParkAttendGroupUsrMapper parkAttendGroupUsrMapper;

    /**
     * 查询考勤组人员
     *
     * @param id 考勤组人员主键
     * @return 考勤组人员
     */
    @Override
    public ParkAttendGroupUsr selectParkAttendGroupUsrById(Long id) {
        return parkAttendGroupUsrMapper.selectParkAttendGroupUsrById(id);
    }

    /**
     * 查询考勤组人员列表
     *
     * @param parkAttendGroupUsr 考勤组人员
     * @return 考勤组人员
     */
    @Override
    public List<ParkAttendGroupUsr> selectParkAttendGroupUsrList(ParkAttendGroupUsr parkAttendGroupUsr) {
        return parkAttendGroupUsrMapper.selectParkAttendGroupUsrList(parkAttendGroupUsr);
    }

    /**
     * 新增考勤组人员
     *
     * @param parkAttendGroupUsr 考勤组人员
     * @return 结果
     */
    @Override
    public int insertParkAttendGroupUsr(ParkAttendGroupUsr parkAttendGroupUsr) {
        return parkAttendGroupUsrMapper.insertParkAttendGroupUsr(parkAttendGroupUsr);
    }

    @Override
    public void insertParkAttendGroupUsrBatch(List<ParkAttendGroupUsr> userList) {
        parkAttendGroupUsrMapper.insertParkAttendGroupUsrBatch(userList);
    }

    /**
     * 修改考勤组人员
     *
     * @param parkAttendGroupUsr 考勤组人员
     * @return 结果
     */
    @Override
    public int updateParkAttendGroupUsr(ParkAttendGroupUsr parkAttendGroupUsr) {
        return parkAttendGroupUsrMapper.updateParkAttendGroupUsr(parkAttendGroupUsr);
    }

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

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