package com.microservices.pms.pipeline.service.impl;

import com.microservices.common.core.utils.DateUtils;
import com.microservices.pms.pipeline.domain.PmsCiPipelineGraphics;
import com.microservices.pms.pipeline.mapper.PmsCiPipelineGraphicsMapper;
import com.microservices.pms.pipeline.service.IPmsCiPipelineGraphicsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流水线图形化构建Service业务层处理
 * 
 * @author wanjia
 * @date 2024-05-23
 */
@Service
public class PmsCiPipelineGraphicsServiceImpl implements IPmsCiPipelineGraphicsService 
{
    @Autowired
    private PmsCiPipelineGraphicsMapper pmsCiPipelineGraphicsMapper;

    /**
     * 查询流水线图形化构建
     * 
     * @param id 流水线图形化构建主键
     * @return 流水线图形化构建
     */
    @Override
    public PmsCiPipelineGraphics selectPmsCiPipelineGraphicsById(Long id)
    {
        return pmsCiPipelineGraphicsMapper.selectPmsCiPipelineGraphicsById(id);
    }

    /**
     * 查询流水线图形化构建列表
     * 
     * @param pmsCiPipelineGraphics 流水线图形化构建
     * @return 流水线图形化构建
     */
    @Override
    public List<PmsCiPipelineGraphics> selectPmsCiPipelineGraphicsList(PmsCiPipelineGraphics pmsCiPipelineGraphics)
    {
        return pmsCiPipelineGraphicsMapper.selectPmsCiPipelineGraphicsList(pmsCiPipelineGraphics);
    }

    /**
     * 新增流水线图形化构建
     * 
     * @param pmsCiPipelineGraphics 流水线图形化构建
     * @return 结果
     */
    @Override
    public int insertPmsCiPipelineGraphics(PmsCiPipelineGraphics pmsCiPipelineGraphics)
    {
        pmsCiPipelineGraphics.setCreateTime(DateUtils.getNowDate());
        return pmsCiPipelineGraphicsMapper.insertPmsCiPipelineGraphics(pmsCiPipelineGraphics);
    }

    /**
     * 修改流水线图形化构建
     * 
     * @param pmsCiPipelineGraphics 流水线图形化构建
     * @return 结果
     */
    @Override
    public int updatePmsCiPipelineGraphics(PmsCiPipelineGraphics pmsCiPipelineGraphics)
    {
        pmsCiPipelineGraphics.setUpdateTime(DateUtils.getNowDate());
        return pmsCiPipelineGraphicsMapper.updatePmsCiPipelineGraphics(pmsCiPipelineGraphics);
    }

    /**
     * 批量删除流水线图形化构建
     * 
     * @param ids 需要删除的流水线图形化构建主键
     * @return 结果
     */
    @Override
    public int deletePmsCiPipelineGraphicsByIds(Long[] ids)
    {
        return pmsCiPipelineGraphicsMapper.deletePmsCiPipelineGraphicsByIds(ids);
    }

    /**
     * 删除流水线图形化构建信息
     * 
     * @param id 流水线图形化构建主键
     * @return 结果
     */
    @Override
    public int deletePmsCiPipelineGraphicsById(Long id)
    {
        return pmsCiPipelineGraphicsMapper.deletePmsCiPipelineGraphicsById(id);
    }

    @Override
    public PmsCiPipelineGraphics selectPmsCiPipelineGraphicsByPmsCiPipelineId(Long pmsCiPipelineId) {
        return pmsCiPipelineGraphicsMapper.selectPmsCiPipelineGraphicsByPmsCiPipelineId(pmsCiPipelineId);
    }

    @Override
    public int deletePmsCiPipelineGraphicsByPipelineIds(Long[] pmsCiPipelineIds) {
        return pmsCiPipelineGraphicsMapper.deletePmsCiPipelineGraphicsByPmsCiPipelineIds(pmsCiPipelineIds);
    }
}
