package com.spider.quartz.service.impl;

import com.spider.common.utils.DateUtils;
import com.spider.quartz.domain.JapanUnqualifiedGoods;
import com.spider.quartz.mapper.JapanUnqualifiedGoodsMapper;
import com.spider.quartz.service.IJapanUnqualifiedGoodsService;
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 JapanUnqualifiedGoodsServiceImpl implements IJapanUnqualifiedGoodsService
{
    @Autowired
    private JapanUnqualifiedGoodsMapper japanUnqualifiedGoodsMapper;

    /**
     * 查询日本不合格商品展示
     * 
     * @param id 日本不合格商品展示主键
     * @return 日本不合格商品展示
     */
    @Override
    public JapanUnqualifiedGoods selectJapanUnqualifiedGoodsById(Long id)
    {
        return japanUnqualifiedGoodsMapper.selectJapanUnqualifiedGoodsById(id);
    }

    /**
     * 查询日本不合格商品展示列表
     * 
     * @param japanUnqualifiedGoods 日本不合格商品展示
     * @return 日本不合格商品展示
     */
    @Override
    public List<JapanUnqualifiedGoods> selectJapanUnqualifiedGoodsList(JapanUnqualifiedGoods japanUnqualifiedGoods)
    {
        return japanUnqualifiedGoodsMapper.selectJapanUnqualifiedGoodsList(japanUnqualifiedGoods);
    }

    /**
     * 新增日本不合格商品展示
     * 
     * @param japanUnqualifiedGoods 日本不合格商品展示
     * @return 结果
     */
    @Override
    public int insertJapanUnqualifiedGoods(JapanUnqualifiedGoods japanUnqualifiedGoods)
    {
        japanUnqualifiedGoods.setCreateTime(DateUtils.getNowDate());
        return japanUnqualifiedGoodsMapper.insertJapanUnqualifiedGoods(japanUnqualifiedGoods);
    }

    /**
     * 修改日本不合格商品展示
     * 
     * @param japanUnqualifiedGoods 日本不合格商品展示
     * @return 结果
     */
    @Override
    public int updateJapanUnqualifiedGoods(JapanUnqualifiedGoods japanUnqualifiedGoods)
    {
        japanUnqualifiedGoods.setUpdateTime(DateUtils.getNowDate());
        return japanUnqualifiedGoodsMapper.updateJapanUnqualifiedGoods(japanUnqualifiedGoods);
    }

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

    /**
     * 删除日本不合格商品展示信息
     * 
     * @param id 日本不合格商品展示主键
     * @return 结果
     */
    @Override
    public int deleteJapanUnqualifiedGoodsById(Long id)
    {
        return japanUnqualifiedGoodsMapper.deleteJapanUnqualifiedGoodsById(id);
    }
}
