package com.spider.quartz.service.impl;

import com.spider.common.utils.DateUtils;
import com.spider.quartz.domain.UsUnqualifiedGoods;
import com.spider.quartz.mapper.UsUnqualifiedGoodsMapper;
import com.spider.quartz.service.IUsUnqualifiedGoodsService;
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 UsUnqualifiedGoodsServiceImpl implements IUsUnqualifiedGoodsService
{
    @Autowired
    private UsUnqualifiedGoodsMapper usUnqualifiedGoodsMapper;

    /**
     * 查询美国不合格商品展示
     * 
     * @param id 美国不合格商品展示主键
     * @return 美国不合格商品展示
     */
    @Override
    public UsUnqualifiedGoods selectUsUnqualifiedGoodsById(Long id)
    {
        return usUnqualifiedGoodsMapper.selectUsUnqualifiedGoodsById(id);
    }

    /**
     * 查询美国不合格商品展示列表
     * 
     * @param usUnqualifiedGoods 美国不合格商品展示
     * @return 美国不合格商品展示
     */
    @Override
    public List<UsUnqualifiedGoods> selectUsUnqualifiedGoodsList(UsUnqualifiedGoods usUnqualifiedGoods)
    {
        return usUnqualifiedGoodsMapper.selectUsUnqualifiedGoodsList(usUnqualifiedGoods);
    }

    /**
     * 新增美国不合格商品展示
     * 
     * @param usUnqualifiedGoods 美国不合格商品展示
     * @return 结果
     */
    @Override
    public int insertUsUnqualifiedGoods(UsUnqualifiedGoods usUnqualifiedGoods)
    {
        usUnqualifiedGoods.setCreateTime(DateUtils.getNowDate());
        return usUnqualifiedGoodsMapper.insertUsUnqualifiedGoods(usUnqualifiedGoods);
    }

    /**
     * 修改美国不合格商品展示
     * 
     * @param usUnqualifiedGoods 美国不合格商品展示
     * @return 结果
     */
    @Override
    public int updateUsUnqualifiedGoods(UsUnqualifiedGoods usUnqualifiedGoods)
    {
        usUnqualifiedGoods.setUpdateTime(DateUtils.getNowDate());
        return usUnqualifiedGoodsMapper.updateUsUnqualifiedGoods(usUnqualifiedGoods);
    }

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

    /**
     * 删除美国不合格商品展示信息
     * 
     * @param id 美国不合格商品展示主键
     * @return 结果
     */
    @Override
    public int deleteUsUnqualifiedGoodsById(Long id)
    {
        return usUnqualifiedGoodsMapper.deleteUsUnqualifiedGoodsById(id);
    }
}
