package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BomanReservatConfigMapper;
import com.ruoyi.system.domain.BomanReservatConfig;
import com.ruoyi.system.service.IBomanReservatConfigService;

/**
 * 预约配置主Service业务层处理
 * 
 * @author boman
 * @date 2023-11-02
 */
@Service
public class BomanReservatConfigServiceImpl implements IBomanReservatConfigService 
{
    @Autowired
    private BomanReservatConfigMapper bomanReservatConfigMapper;

    /**
     * 查询预约配置主
     * 
     * @param reservatConfigId 预约配置主主键
     * @return 预约配置主
     */
    @Override
    public BomanReservatConfig selectBomanReservatConfigByReservatConfigId(Long reservatConfigId)
    {
        return bomanReservatConfigMapper.selectBomanReservatConfigByReservatConfigId(reservatConfigId);
    }

    /**
     * 查询预约配置主列表
     * 
     * @param bomanReservatConfig 预约配置主
     * @return 预约配置主
     */
    @Override
    public List<BomanReservatConfig> selectBomanReservatConfigList(BomanReservatConfig bomanReservatConfig)
    {
        return bomanReservatConfigMapper.selectBomanReservatConfigList(bomanReservatConfig);
    }

    /**
     * 新增预约配置主
     * 
     * @param bomanReservatConfig 预约配置主
     * @return 结果
     */
    @Override
    public int insertBomanReservatConfig(BomanReservatConfig bomanReservatConfig)
    {
        bomanReservatConfig.setCreateTime(DateUtils.getNowDate());
        return bomanReservatConfigMapper.insertBomanReservatConfig(bomanReservatConfig);
    }

    /**
     * 修改预约配置主
     * 
     * @param bomanReservatConfig 预约配置主
     * @return 结果
     */
    @Override
    public int updateBomanReservatConfig(BomanReservatConfig bomanReservatConfig)
    {
        bomanReservatConfig.setUpdateTime(DateUtils.getNowDate());
        return bomanReservatConfigMapper.updateBomanReservatConfig(bomanReservatConfig);
    }

    /**
     * 批量删除预约配置主
     * 
     * @param reservatConfigIds 需要删除的预约配置主主键
     * @return 结果
     */
    @Override
    public int deleteBomanReservatConfigByReservatConfigIds(Long[] reservatConfigIds)
    {
        return bomanReservatConfigMapper.deleteBomanReservatConfigByReservatConfigIds(reservatConfigIds);
    }

    /**
     * 删除预约配置主信息
     * 
     * @param reservatConfigId 预约配置主主键
     * @return 结果
     */
    @Override
    public int deleteBomanReservatConfigByReservatConfigId(Long reservatConfigId)
    {
        return bomanReservatConfigMapper.deleteBomanReservatConfigByReservatConfigId(reservatConfigId);
    }
}
