package com.fs.company.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.company.domain.CompanyWorkflowEdge;
import com.fs.company.vo.CompanyNodeInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * AI工作流连线Mapper接口
 *
 * @author fs
 * @date 2026-01-06
 */
public interface CompanyWorkflowEdgeMapper  extends BaseMapper<CompanyWorkflowEdge> {

    CompanyWorkflowEdge selectCompanyWorkflowEdgeById(Long edgeId);

    List<CompanyWorkflowEdge> selectCompanyWorkflowEdgeByWorkflowId(Long workflowId);

    Integer insertCompanyWorkflowEdge(CompanyWorkflowEdge edge);

    Integer batchInsertCompanyWorkflowEdge(List<CompanyWorkflowEdge> edges);

    Integer updateCompanyWorkflowEdge(CompanyWorkflowEdge edge);

    Integer deleteCompanyWorkflowEdgeById(Long edgeId);

    Integer deleteCompanyWorkflowEdgeByWorkflowId(Long workflowId);

    List<CompanyWorkflowEdge> selectListByWorkflowIdAndNodeKey(@Param("workflowId")Long workflowId, @Param("nodeKey")String nodeKey);

    /**
     *获取节点信息
     *
     * */
    CompanyNodeInfoVo slectNodeInfoByWorkflowId(@Param("workflowId")Long workflowId, @Param("nodeKey")String nodeKey);
}
