package com.ruoyi.framework.recovery.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.framework.recovery.mapper.RecStallCategoryMapper;
import com.ruoyi.framework.recovery.domain.RecStallCategory;
import com.ruoyi.framework.recovery.service.IRecStallCategoryService;

/**
 * 回收档口类型Service业务层处理
 *
 * @author jin
 * @date 2024-11-16
 */
@Service
public class RecStallCategoryServiceImpl implements IRecStallCategoryService
{
    @Autowired
    private RecStallCategoryMapper recStallCategoryMapper;

    /**
     * 查询回收档口类型
     *
     * @param id 回收档口类型主键
     * @return 回收档口类型
     */
    @Override
    public RecStallCategory selectRecStallCategoryById(Long id)
    {
        return recStallCategoryMapper.selectRecStallCategoryById(id);
    }

    /**
     * 查询回收档口类型列表
     *
     * @param recStallCategory 回收档口类型
     * @return 回收档口类型
     */
    @Override
    public List<RecStallCategory> selectRecStallCategoryList(RecStallCategory recStallCategory)
    {
        return recStallCategoryMapper.selectRecStallCategoryList(recStallCategory);
    }

    /**
     * 新增回收档口类型
     *
     * @param recStallCategory 回收档口类型
     * @return 结果
     */
    @Override
    public int insertRecStallCategory(RecStallCategory recStallCategory)
    {
        recStallCategory.setCreateDate(new Date());
        return recStallCategoryMapper.insertRecStallCategory(recStallCategory);
    }

    /**
     * 修改回收档口类型
     *
     * @param recStallCategory 回收档口类型
     * @return 结果
     */
    @Override
    public int updateRecStallCategory(RecStallCategory recStallCategory)
    {
        return recStallCategoryMapper.updateRecStallCategory(recStallCategory);
    }

    /**
     * 批量删除回收档口类型
     *
     * @param ids 需要删除的回收档口类型主键
     * @return 结果
     */
    @Override
    public int deleteRecStallCategoryByIds(Long[] ids)
    {
        return recStallCategoryMapper.deleteRecStallCategoryByIds(ids);
    }

    /**
     * 删除回收档口类型信息
     *
     * @param id 回收档口类型主键
     * @return 结果
     */
    @Override
    public int deleteRecStallCategoryById(Long id)
    {
        return recStallCategoryMapper.deleteRecStallCategoryById(id);
    }
}
