package com.ruoyi.model.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.model.mapper.AppletServiceDateMapper;
import com.ruoyi.model.domain.AppletServiceDate;
import com.ruoyi.model.service.IAppletServiceDateService;

/**
 * 服务日期Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletServiceDateServiceImpl implements IAppletServiceDateService 
{
    @Autowired
    private AppletServiceDateMapper appletServiceDateMapper;

    /**
     * 查询服务日期
     * 
     * @param id 服务日期主键
     * @return 服务日期
     */
    @Override
    public AppletServiceDate selectAppletServiceDateById(Long id)
    {
        return appletServiceDateMapper.selectAppletServiceDateById(id);
    }

    /**
     * 查询服务日期列表
     * 
     * @param appletServiceDate 服务日期
     * @return 服务日期
     */
    @Override
    public List<AppletServiceDate> selectAppletServiceDateList(AppletServiceDate appletServiceDate)
    {
        return appletServiceDateMapper.selectAppletServiceDateList(appletServiceDate);
    }

    /**
     * 新增服务日期
     * 
     * @param appletServiceDate 服务日期
     * @return 结果
     */
    @Override
    public int insertAppletServiceDate(AppletServiceDate appletServiceDate)
    {
        appletServiceDate.setCreateTime(DateUtils.getNowDate());
        return appletServiceDateMapper.insertAppletServiceDate(appletServiceDate);
    }

    /**
     * 修改服务日期
     * 
     * @param appletServiceDate 服务日期
     * @return 结果
     */
    @Override
    public int updateAppletServiceDate(AppletServiceDate appletServiceDate)
    {
        appletServiceDate.setUpdateTime(DateUtils.getNowDate());
        return appletServiceDateMapper.updateAppletServiceDate(appletServiceDate);
    }

    /**
     * 批量删除服务日期
     * 
     * @param ids 需要删除的服务日期主键
     * @return 结果
     */
    @Override
    public int deleteAppletServiceDateByIds(Long[] ids)
    {
        return appletServiceDateMapper.deleteAppletServiceDateByIds(ids);
    }

    /**
     * 删除服务日期信息
     * 
     * @param id 服务日期主键
     * @return 结果
     */
    @Override
    public int deleteAppletServiceDateById(Long id)
    {
        return appletServiceDateMapper.deleteAppletServiceDateById(id);
    }
}
