package com.spider.quartz.service.impl;

import com.spider.common.utils.DateUtils;
import com.spider.quartz.domain.EuUnqualifiedGoods;
import com.spider.quartz.mapper.EuUnqualifiedGoodsMapper;
import com.spider.quartz.service.IEuUnqualifiedGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 欧盟不合格商品展示Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-26
 */
@Service
public class EuUnqualifiedGoodsServiceImpl implements IEuUnqualifiedGoodsService
{
    @Autowired
    private EuUnqualifiedGoodsMapper euUnqualifiedGoodsMapper;

    /**
     * 查询欧盟不合格商品展示
     * 
     * @param id 欧盟不合格商品展示主键
     * @return 欧盟不合格商品展示
     */
    @Override
    public EuUnqualifiedGoods selectEuUnqualifiedGoodsById(Long id)
    {
        return euUnqualifiedGoodsMapper.selectEuUnqualifiedGoodsById(id);
    }

    /**
     * 查询欧盟不合格商品展示列表
     * 
     * @param euUnqualifiedGoods 欧盟不合格商品展示
     * @return 欧盟不合格商品展示
     */
    @Override
    public List<EuUnqualifiedGoods> selectEuUnqualifiedGoodsList(EuUnqualifiedGoods euUnqualifiedGoods)
    {
        return euUnqualifiedGoodsMapper.selectEuUnqualifiedGoodsList(euUnqualifiedGoods);
    }

    /**
     * 新增欧盟不合格商品展示
     * 
     * @param euUnqualifiedGoods 欧盟不合格商品展示
     * @return 结果
     */
    @Override
    public int insertEuUnqualifiedGoods(EuUnqualifiedGoods euUnqualifiedGoods)
    {
        euUnqualifiedGoods.setCreateTime(DateUtils.getNowDate());
        return euUnqualifiedGoodsMapper.insertEuUnqualifiedGoods(euUnqualifiedGoods);
    }

    /**
     * 修改欧盟不合格商品展示
     * 
     * @param euUnqualifiedGoods 欧盟不合格商品展示
     * @return 结果
     */
    @Override
    public int updateEuUnqualifiedGoods(EuUnqualifiedGoods euUnqualifiedGoods)
    {
        euUnqualifiedGoods.setUpdateTime(DateUtils.getNowDate());
        return euUnqualifiedGoodsMapper.updateEuUnqualifiedGoods(euUnqualifiedGoods);
    }

    /**
     * 批量删除欧盟不合格商品展示
     * 
     * @param ids 需要删除的欧盟不合格商品展示主键
     * @return 结果
     */
    @Override
    public int deleteEuUnqualifiedGoodsByIds(Long[] ids)
    {
        return euUnqualifiedGoodsMapper.deleteEuUnqualifiedGoodsByIds(ids);
    }

    /**
     * 删除欧盟不合格商品展示信息
     * 
     * @param id 欧盟不合格商品展示主键
     * @return 结果
     */
    @Override
    public int deleteEuUnqualifiedGoodsById(Long id)
    {
        return euUnqualifiedGoodsMapper.deleteEuUnqualifiedGoodsById(id);
    }
}
