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.ParkAttendGroupMapper;
import com.huashe.park.core.service.IParkAttendGroupService;
import com.huashe.park.domain.entity.ParkAttendGroup;
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 ParkAttendGroupServiceImpl implements IParkAttendGroupService {
    @Autowired
    private ParkAttendGroupMapper parkAttendGroupMapper;

    /**
     * 查询考勤组
     *
     * @param id 考勤组主键
     * @return 考勤组
     */
    @Override
    public ParkAttendGroup selectParkAttendGroupById(Long id) {
        return parkAttendGroupMapper.selectParkAttendGroupById(id);
    }

    /**
     * 查询考勤组列表
     *
     * @param parkAttendGroup 考勤组
     * @return 考勤组
     */
    @Override
    public List<ParkAttendGroup> selectParkAttendGroupList(ParkAttendGroup parkAttendGroup) {
        return parkAttendGroupMapper.selectParkAttendGroupList(parkAttendGroup);
    }

    /**
     * 新增考勤组
     *
     * @param parkAttendGroup 考勤组
     * @return 结果
     */
    @Override
    public int insertParkAttendGroup(ParkAttendGroup parkAttendGroup) {
        return parkAttendGroupMapper.insertParkAttendGroup(parkAttendGroup);
    }

    /**
     * 修改考勤组
     *
     * @param parkAttendGroup 考勤组
     * @return 结果
     */
    @Override
    public int updateParkAttendGroup(ParkAttendGroup parkAttendGroup) {
        return parkAttendGroupMapper.updateParkAttendGroup(parkAttendGroup);
    }

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

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