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.SingleMapper;
import com.ruoyi.model.domain.Single;
import com.ruoyi.model.service.ISingleService;

/**
 * 不接单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
@Service
public class SingleServiceImpl implements ISingleService 
{
    @Autowired
    private SingleMapper singleMapper;

    /**
     * 查询不接单信息
     * 
     * @param singleId 不接单信息主键
     * @return 不接单信息
     */
    @Override
    public Single selectSingleBySingleId(Long singleId)
    {
        return singleMapper.selectSingleBySingleId(singleId);
    }

    /**
     * 查询不接单信息列表
     * 
     * @param single 不接单信息
     * @return 不接单信息
     */
    @Override
    public List<Single> selectSingleList(Single single)
    {
        return singleMapper.selectSingleList(single);
    }

    /**
     * 新增不接单信息
     * 
     * @param single 不接单信息
     * @return 结果
     */
    @Override
    public int insertSingle(Single single)
    {
        single.setCreateTime(DateUtils.getNowDate());
        return singleMapper.insertSingle(single);
    }

    /**
     * 修改不接单信息
     * 
     * @param single 不接单信息
     * @return 结果
     */
    @Override
    public int updateSingle(Single single)
    {
        single.setUpdateTime(DateUtils.getNowDate());
        return singleMapper.updateSingle(single);
    }

    /**
     * 批量删除不接单信息
     * 
     * @param singleIds 需要删除的不接单信息主键
     * @return 结果
     */
    @Override
    public int deleteSingleBySingleIds(Long[] singleIds)
    {
        return singleMapper.deleteSingleBySingleIds(singleIds);
    }

    /**
     * 删除不接单信息信息
     * 
     * @param singleId 不接单信息主键
     * @return 结果
     */
    @Override
    public int deleteSingleBySingleId(Long singleId)
    {
        return singleMapper.deleteSingleBySingleId(singleId);
    }

    /**
     * 查询不接单信息列表
     *
     * @return 不接单信息集合
     */
    @Override
    public List<Single> getSingleList(){
        return singleMapper.getSingleList();
    }
}
