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.MdAppFlowMapper;
import com.ruoyi.interfaces.domain.MdAppFlow;
import com.ruoyi.interfaces.service.IMdAppFlowService;

/**
 * 模型应用流程Service业务层处理
 * 
 * @author 朱得糠
 * @date 2025-08-19
 */
@Service
public class MdAppFlowServiceImpl implements IMdAppFlowService 
{
    @Autowired
    private MdAppFlowMapper mdAppFlowMapper;

    /**
     * 查询模型应用流程
     * 
     * @param flowId 模型应用流程主键
     * @return 模型应用流程
     */
    @Override
    public MdAppFlow selectMdAppFlowByFlowId(Long flowId)
    {
        return mdAppFlowMapper.selectMdAppFlowByFlowId(flowId);
    }

    /**
     * 查询模型应用流程列表
     * 
     * @param mdAppFlow 模型应用流程
     * @return 模型应用流程
     */
    @Override
    public List<MdAppFlow> selectMdAppFlowList(MdAppFlow mdAppFlow)
    {
        return mdAppFlowMapper.selectMdAppFlowList(mdAppFlow);
    }

    /**
     * 新增模型应用流程
     * 
     * @param mdAppFlow 模型应用流程
     * @return 结果
     */
    @Override
    public int insertMdAppFlow(MdAppFlow mdAppFlow)
    {
        mdAppFlow.setCreateTime(DateUtils.getNowDate());
        return mdAppFlowMapper.insertMdAppFlow(mdAppFlow);
    }

    /**
     * 修改模型应用流程
     * 
     * @param mdAppFlow 模型应用流程
     * @return 结果
     */
    @Override
    public int updateMdAppFlow(MdAppFlow mdAppFlow)
    {
        mdAppFlow.setUpdateTime(DateUtils.getNowDate());
        return mdAppFlowMapper.updateMdAppFlow(mdAppFlow);
    }

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

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