package com.ruoyi.interfaces.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.interfaces.mapper.MdModelFlowMapper;
import com.ruoyi.interfaces.domain.MdModelFlow;
import com.ruoyi.interfaces.service.IMdModelFlowService;

/**
 * 模型流程Service业务层处理
 * 
 * @author 朱得糠
 * @date 2025-08-02
 */
@Service
public class MdModelFlowServiceImpl implements IMdModelFlowService 
{
    @Autowired
    private MdModelFlowMapper mdModelFlowMapper;

    /**
     * 查询模型流程
     * 
     * @param flowId 模型流程主键
     * @return 模型流程
     */
    @Override
    public MdModelFlow selectMdModelFlowByFlowId(Long flowId)
    {
        return mdModelFlowMapper.selectMdModelFlowByFlowId(flowId);
    }

    /**
     * 查询模型流程列表
     * 
     * @param mdModelFlow 模型流程
     * @return 模型流程
     */
    @Override
    public List<MdModelFlow> selectMdModelFlowList(MdModelFlow mdModelFlow)
    {
        return mdModelFlowMapper.selectMdModelFlowList(mdModelFlow);
    }

    /**
     * 新增模型流程
     * 
     * @param mdModelFlow 模型流程
     * @return 结果
     */
    @Override
    public int insertMdModelFlow(MdModelFlow mdModelFlow)
    {
        mdModelFlow.setCreateTime(DateUtils.getNowDate());
        return mdModelFlowMapper.insertMdModelFlow(mdModelFlow);
    }

    /**
     * 修改模型流程
     * 
     * @param mdModelFlow 模型流程
     * @return 结果
     */
    @Override
    public int updateMdModelFlow(MdModelFlow mdModelFlow)
    {
        mdModelFlow.setUpdateTime(DateUtils.getNowDate());
        return mdModelFlowMapper.updateMdModelFlow(mdModelFlow);
    }

    /**
     * 批量删除模型流程
     * 
     * @param flowIds 需要删除的模型流程主键
     * @return 结果
     */
    @Override
    public int deleteMdModelFlowByFlowIds(Long[] flowIds)
    {
        return mdModelFlowMapper.deleteMdModelFlowByFlowIds(flowIds);
    }

    /**
     * 删除模型流程信息
     * 
     * @param flowId 模型流程主键
     * @return 结果
     */
    @Override
    public int deleteMdModelFlowByFlowId(Long flowId)
    {
        return mdModelFlowMapper.deleteMdModelFlowByFlowId(flowId);
    }
}
