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.RecCommodityMapper;
import com.ruoyi.framework.recovery.domain.RecCommodity;
import com.ruoyi.framework.recovery.service.IRecCommodityService;

/**
 * 回收品牌Service业务层处理
 *
 * @author jin
 * @date 2024-11-16
 */
@Service
public class RecCommodityServiceImpl implements IRecCommodityService
{
    @Autowired
    private RecCommodityMapper recCommodityMapper;

    /**
     * 查询回收品牌
     *
     * @param id 回收品牌主键
     * @return 回收品牌
     */
    @Override
    public RecCommodity selectRecCommodityById(Long id)
    {
        return recCommodityMapper.selectRecCommodityById(id);
    }

    /**
     * 查询回收品牌列表
     *
     * @param recCommodity 回收品牌
     * @return 回收品牌
     */
    @Override
    public List<RecCommodity> selectRecCommodityList(RecCommodity recCommodity)
    {
        return recCommodityMapper.selectRecCommodityList(recCommodity);
    }

    /**
     * 新增回收品牌
     *
     * @param recCommodity 回收品牌
     * @return 结果
     */
    @Override
    public int insertRecCommodity(RecCommodity recCommodity)
    {
        recCommodity.setCreateDate(new Date());
        return recCommodityMapper.insertRecCommodity(recCommodity);
    }

    /**
     * 修改回收品牌
     *
     * @param recCommodity 回收品牌
     * @return 结果
     */
    @Override
    public int updateRecCommodity(RecCommodity recCommodity)
    {
        return recCommodityMapper.updateRecCommodity(recCommodity);
    }

    /**
     * 批量删除回收品牌
     *
     * @param ids 需要删除的回收品牌主键
     * @return 结果
     */
    @Override
    public int deleteRecCommodityByIds(Long[] ids)
    {
        return recCommodityMapper.deleteRecCommodityByIds(ids);
    }

    /**
     * 删除回收品牌信息
     *
     * @param id 回收品牌主键
     * @return 结果
     */
    @Override
    public int deleteRecCommodityById(Long id)
    {
        return recCommodityMapper.deleteRecCommodityById(id);
    }
}
