package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DoumuProductHistoryMapper;
import com.ruoyi.system.domain.DoumuProductHistory;
import com.ruoyi.system.service.IDoumuProductHistoryService;

/**
 * 痘姆古陶主历史信息Service业务层处理
 * 
 * @author boman
 * @date 2024-01-16
 */
@Service
public class DoumuProductHistoryServiceImpl implements IDoumuProductHistoryService 
{
    @Autowired
    private DoumuProductHistoryMapper doumuProductHistoryMapper;

    /**
     * 查询痘姆古陶主历史信息
     * 
     * @param historyId 痘姆古陶主历史信息主键
     * @return 痘姆古陶主历史信息
     */
    @Override
    public DoumuProductHistory selectDoumuProductHistoryByHistoryId(Long historyId)
    {
        return doumuProductHistoryMapper.selectDoumuProductHistoryByHistoryId(historyId);
    }

    /**
     * 查询痘姆古陶主历史信息列表
     * 
     * @param doumuProductHistory 痘姆古陶主历史信息
     * @return 痘姆古陶主历史信息
     */
    @Override
    public List<DoumuProductHistory> selectDoumuProductHistoryList(DoumuProductHistory doumuProductHistory)
    {
        return doumuProductHistoryMapper.selectDoumuProductHistoryList(doumuProductHistory);
    }

    /**
     * 新增痘姆古陶主历史信息
     * 
     * @param doumuProductHistory 痘姆古陶主历史信息
     * @return 结果
     */
    @Override
    public int insertDoumuProductHistory(DoumuProductHistory doumuProductHistory)
    {

        doumuProductHistory.setCreateTime(DateUtils.getNowDate());
        return doumuProductHistoryMapper.insertDoumuProductHistory(doumuProductHistory);
    }

    /**
     * 修改痘姆古陶主历史信息
     * 
     * @param doumuProductHistory 痘姆古陶主历史信息
     * @return 结果
     */
    @Override
    public int updateDoumuProductHistory(DoumuProductHistory doumuProductHistory)
    {
        doumuProductHistory.setUpdateTime(DateUtils.getNowDate());
        return doumuProductHistoryMapper.updateDoumuProductHistory(doumuProductHistory);
    }

    /**
     * 批量删除痘姆古陶主历史信息
     * 
     * @param historyIds 需要删除的痘姆古陶主历史信息主键
     * @return 结果
     */
    @Override
    public int deleteDoumuProductHistoryByHistoryIds(Long[] historyIds)
    {
        return doumuProductHistoryMapper.deleteDoumuProductHistoryByHistoryIds(historyIds);
    }

    /**
     * 删除痘姆古陶主历史信息信息
     * 
     * @param historyId 痘姆古陶主历史信息主键
     * @return 结果
     */
    @Override
    public int deleteDoumuProductHistoryByHistoryId(Long historyId)
    {
        return doumuProductHistoryMapper.deleteDoumuProductHistoryByHistoryId(historyId);
    }
}
