package com.leromro.core.service.impl;

import java.time.LocalDate;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leromro.core.mapper.VolunteerReservationTimeMapper;
import com.leromro.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.leromro.core.mapper.VolunteerReservationTimeMapper;
import com.leromro.core.domain.VolunteerReservationTime;
import com.leromro.core.service.IVolunteerReservationTimeService;

/**
 * 志愿者预约时间Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-08
 */
@Service
public class VolunteerReservationTimeServiceImpl extends ServiceImpl<VolunteerReservationTimeMapper, VolunteerReservationTime> implements IVolunteerReservationTimeService
{
    @Autowired
    private VolunteerReservationTimeMapper volunteerReservationTimeMapper;

    /**
     * 查询志愿者预约时间
     * 
     * @param volunteerReservationTimeId 志愿者预约时间主键
     * @return 志愿者预约时间
     */
    @Override
    public VolunteerReservationTime selectVolunteerReservationTimeByVolunteerReservationTimeId(Long volunteerReservationTimeId)
    {
        return volunteerReservationTimeMapper.selectVolunteerReservationTimeByVolunteerReservationTimeId(volunteerReservationTimeId);
    }

    /**
     * 查询志愿者预约时间列表
     * 
     * @param volunteerReservationTime 志愿者预约时间
     * @return 志愿者预约时间
     */
    @Override
    public List<VolunteerReservationTime> selectVolunteerReservationTimeList(VolunteerReservationTime volunteerReservationTime)
    {
        return volunteerReservationTimeMapper.selectVolunteerReservationTimeList(volunteerReservationTime);
    }

    /**
     * 新增志愿者预约时间
     * 
     * @param volunteerReservationTime 志愿者预约时间
     * @return 结果
     */
    @Override
    public Boolean insertVolunteerReservationTime(VolunteerReservationTime volunteerReservationTime)
    {
        return this.save(volunteerReservationTime);
    }

    /**
     * 修改志愿者预约时间
     * 
     * @param volunteerReservationTime 志愿者预约时间
     * @return 结果
     */
    @Override
    public Boolean updateVolunteerReservationTime(VolunteerReservationTime volunteerReservationTime)
    {
        return this.updateById(volunteerReservationTime);
    }

    /**
     * 批量删除志愿者预约时间
     * 
     * @param volunteerReservationTimeIds 需要删除的志愿者预约时间主键
     * @return 结果
     */
    @Override
    public int deleteVolunteerReservationTimeByVolunteerReservationTimeIds(Long[] volunteerReservationTimeIds)
    {
        return volunteerReservationTimeMapper.deleteVolunteerReservationTimeByVolunteerReservationTimeIds(volunteerReservationTimeIds);
    }

    /**
     * 删除志愿者预约时间信息
     * 
     * @param volunteerReservationTimeId 志愿者预约时间主键
     * @return 结果
     */
    @Override
    public int deleteVolunteerReservationTimeByVolunteerReservationTimeId(Long volunteerReservationTimeId)
    {
        return volunteerReservationTimeMapper.deleteVolunteerReservationTimeByVolunteerReservationTimeId(volunteerReservationTimeId);
    }

    public int insertVolunteerReservationTimeList(List<VolunteerReservationTime> reservationTimes) {
        return volunteerReservationTimeMapper.insertVolunteerReservationTimeList(reservationTimes);
    }
}
