package com.mcwl.resource.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.WorkFlowVersion;
import com.mcwl.resource.domain.dto.AddWorkFlowVersion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工作流版本 业务实现层
 * @author DaiZibo
 * @date 2025/1/9
 * @apiNote
 */

@Mapper
public interface WorkFlowVersionMapper extends BaseMapper<WorkFlowVersion> {

    void addWorkFlowVersion(@Param("workFlow") WorkFlow workFlow, @Param("list") List<AddWorkFlowVersion> workFlowVersionList);

    void updateWorkFlowVersion(WorkFlowVersion workFlowVersion);

    void updateByName(WorkFlowVersion workFlowVersion);

    WorkFlowVersion selectByFileName(@Param("name") String name);

    WorkFlowVersion selectByHash(@Param("hashCode") String hashCode);

    WorkFlowVersion selectByWorkFlowId(@Param("id") Long id);

}
