package com.ruoyi.model.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletOutDateMapper;
import com.ruoyi.model.domain.AppletOutDate;
import com.ruoyi.model.service.IAppletOutDateService;

/**
 * 不接单日期Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletOutDateServiceImpl extends ServiceImpl<AppletOutDateMapper, AppletOutDate> implements IAppletOutDateService
{
    @Autowired
    private AppletOutDateMapper appletOutDateMapper;

    /**
     * 查询不接单日期
     * 
     * @param id 不接单日期主键
     * @return 不接单日期
     */
    @Override
    public AppletOutDate selectAppletOutDateById(Long id)
    {
        return appletOutDateMapper.selectAppletOutDateById(id);
    }

    /**
     * 查询不接单日期列表
     * 
     * @param appletOutDate 不接单日期
     * @return 不接单日期
     */
    @Override
    public List<AppletOutDate> selectAppletOutDateList(AppletOutDate appletOutDate)
    {
        return appletOutDateMapper.selectAppletOutDateList(appletOutDate);
    }

    /**
     * 新增不接单日期
     * 
     * @param appletOutDate 不接单日期
     * @return 结果
     */
    @Override
    public int insertAppletOutDate(AppletOutDate appletOutDate)
    {
        appletOutDate.setCreateTime(DateUtils.getNowDate());
        return appletOutDateMapper.insertAppletOutDate(appletOutDate);
    }

    /**
     * 修改不接单日期
     * 
     * @param appletOutDate 不接单日期
     * @return 结果
     */
    @Override
    public int updateAppletOutDate(AppletOutDate appletOutDate)
    {
        appletOutDate.setUpdateTime(DateUtils.getNowDate());
        return appletOutDateMapper.updateAppletOutDate(appletOutDate);
    }

    /**
     * 批量删除不接单日期
     * 
     * @param ids 需要删除的不接单日期主键
     * @return 结果
     */
    @Override
    public int deleteAppletOutDateByIds(Long[] ids)
    {
        return appletOutDateMapper.deleteAppletOutDateByIds(ids);
    }



    @Override
    public int deleteAppletOutDateByIdList(Long addressId){
        return appletOutDateMapper.deleteAppletOutDateByIdList(addressId);
    }
    /**
     * 删除不接单日期信息
     * 
     * @param id 不接单日期主键
     * @return 结果
     */
    @Override
    public int deleteAppletOutDateById(Long id)
    {
        return appletOutDateMapper.deleteAppletOutDateById(id);
    }
}
