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.RecStoresMapper;
import com.ruoyi.framework.recovery.domain.RecStores;
import com.ruoyi.framework.recovery.service.IRecStoresService;

/**
 * 回收发售门店Service业务层处理
 *
 * @author jin
 * @date 2024-11-16
 */
@Service
public class RecStoresServiceImpl implements IRecStoresService
{
    @Autowired
    private RecStoresMapper recStoresMapper;

    /**
     * 查询回收发售门店
     *
     * @param id 回收发售门店主键
     * @return 回收发售门店
     */
    @Override
    public RecStores selectRecStoresById(Long id)
    {
        return recStoresMapper.selectRecStoresById(id);
    }

    /**
     * 查询回收发售门店列表
     *
     * @param recStores 回收发售门店
     * @return 回收发售门店
     */
    @Override
    public List<RecStores> selectRecStoresList(RecStores recStores)
    {
        return recStoresMapper.selectRecStoresList(recStores);
    }

    /**
     * 新增回收发售门店
     *
     * @param recStores 回收发售门店
     * @return 结果
     */
    @Override
    public int insertRecStores(RecStores recStores)
    {
        recStores.setCreateDate(new Date());
        return recStoresMapper.insertRecStores(recStores);
    }

    /**
     * 修改回收发售门店
     *
     * @param recStores 回收发售门店
     * @return 结果
     */
    @Override
    public int updateRecStores(RecStores recStores)
    {
        return recStoresMapper.updateRecStores(recStores);
    }

    /**
     * 批量删除回收发售门店
     *
     * @param ids 需要删除的回收发售门店主键
     * @return 结果
     */
    @Override
    public int deleteRecStoresByIds(Long[] ids)
    {
        return recStoresMapper.deleteRecStoresByIds(ids);
    }

    /**
     * 删除回收发售门店信息
     *
     * @param id 回收发售门店主键
     * @return 结果
     */
    @Override
    public int deleteRecStoresById(Long id)
    {
        return recStoresMapper.deleteRecStoresById(id);
    }
}
