package com.tykj.workflowcore.workflow_editer.dao;


import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * ClassName:    FlowsInfoMapper
 * Package:    com.tykj.mapper
 * Datetime:    2021/2/23   14:06
 * @Author: zsp
 */
public interface FlowsInfoMapper extends JpaRepository<FlowsInfo,Integer>, JpaSpecificationExecutor<FlowsInfo>  {

    /**
     * 根据流程主键查询
     * @param flowKey 流程主键
     * @return FlowsInfo
     */
    FlowsInfo findByFlowKey(String flowKey);

    /**
     * 根据部署流程id查询
     * @param deployId 部署id
     * @return FlowsInfo
     */
    FlowsInfo findByDeployId(String deployId);

    /**
     * 根据流程实例id查询
     * @param processInstanceId 流程实例id
     * @return
     */
    FlowsInfo findByProcessInstanceId(String processInstanceId);

}
