package com.vetti.hotake.service.impl;

import java.util.List;

import com.vetti.common.core.service.BaseServiceImpl;
import com.vetti.common.enums.FillTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.vetti.hotake.mapper.HotakeMeetingCalendarDetailMapper;
import com.vetti.hotake.domain.HotakeMeetingCalendarDetail;
import com.vetti.hotake.service.IHotakeMeetingCalendarDetailService;

/**
 * 会议日历记录明细Service业务层处理
 * 
 * @author wangxiangshun
 * @date 2025-11-09
 */
@SuppressWarnings("all")
@Service
public class HotakeMeetingCalendarDetailServiceImpl extends BaseServiceImpl implements IHotakeMeetingCalendarDetailService
{
    @Autowired
    private HotakeMeetingCalendarDetailMapper hotakeMeetingCalendarDetailMapper;

    /**
     * 查询会议日历记录明细
     * 
     * @param id 会议日历记录明细主键
     * @return 会议日历记录明细
     */
    @Transactional(readOnly = true)
    @Override
    public HotakeMeetingCalendarDetail selectHotakeMeetingCalendarDetailById(Long id)
    {
        return hotakeMeetingCalendarDetailMapper.selectHotakeMeetingCalendarDetailById(id);
    }

    /**
     * 查询会议日历记录明细列表
     * 
     * @param hotakeMeetingCalendarDetail 会议日历记录明细
     * @return 会议日历记录明细
     */
    @Transactional(readOnly = true)
    @Override
    public List<HotakeMeetingCalendarDetail> selectHotakeMeetingCalendarDetailList(HotakeMeetingCalendarDetail hotakeMeetingCalendarDetail)
    {
        return hotakeMeetingCalendarDetailMapper.selectHotakeMeetingCalendarDetailList(hotakeMeetingCalendarDetail);
    }

    /**
     * 新增会议日历记录明细
     * 
     * @param hotakeMeetingCalendarDetail 会议日历记录明细
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public HotakeMeetingCalendarDetail insertHotakeMeetingCalendarDetail(HotakeMeetingCalendarDetail hotakeMeetingCalendarDetail)
    {
        fill(FillTypeEnum.INSERT.getCode(), hotakeMeetingCalendarDetail);
        hotakeMeetingCalendarDetailMapper.insertHotakeMeetingCalendarDetail(hotakeMeetingCalendarDetail);
        return hotakeMeetingCalendarDetail;
    }

    /**
     * 修改会议日历记录明细
     * 
     * @param hotakeMeetingCalendarDetail 会议日历记录明细
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public HotakeMeetingCalendarDetail updateHotakeMeetingCalendarDetail(HotakeMeetingCalendarDetail hotakeMeetingCalendarDetail)
    {
        fill(FillTypeEnum.UPDATE.getCode(), hotakeMeetingCalendarDetail);
        hotakeMeetingCalendarDetailMapper.updateHotakeMeetingCalendarDetail(hotakeMeetingCalendarDetail);
        return hotakeMeetingCalendarDetail;
    }

    /**
     * 批量删除会议日历记录明细
     * 
     * @param ids 需要删除的会议日历记录明细主键
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int deleteHotakeMeetingCalendarDetailByIds(Long[] ids)
    {
        return hotakeMeetingCalendarDetailMapper.deleteHotakeMeetingCalendarDetailByIds(ids);
    }

    /**
     * 删除会议日历记录明细信息
     * 
     * @param id 会议日历记录明细主键
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int deleteHotakeMeetingCalendarDetailById(Long id)
    {
        return hotakeMeetingCalendarDetailMapper.deleteHotakeMeetingCalendarDetailById(id);
    }
    /**
     * 批量新增会议日历记录明细
     *
     * @param hotakeMeetingCalendarDetailList 会议日历记录明细列表
     * @return 结果
     */
    @Transactional(rollbackFor=Exception.class)
    @Override
    public int batchInsertHotakeMeetingCalendarDetail(List<HotakeMeetingCalendarDetail> hotakeMeetingCalendarDetailList){
        return hotakeMeetingCalendarDetailMapper.batchInsertHotakeMeetingCalendarDetail(hotakeMeetingCalendarDetailList);
    }

    /**
     * 删除参会人员信息
     * @param infoId 会议日历记录主键
     * @return
     */
    @Override
    public int deleteHotakeMeetingCalendarDetailByInfoId(Long infoId) {
        return hotakeMeetingCalendarDetailMapper.deleteHotakeMeetingCalendarDetailByInfoId(infoId);
    }
}
