/**
 * Copyright &copy; 2021-2026 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.flowable.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.flowable.model.ActRuTaskInfo;
import com.jeeplus.flowable.model.Flow;
import org.apache.ibatis.annotations.Param;

/**
 * 审批Mapper接口
 *
 * @author jeeplus
 * @version 2021-05-16
 */
public interface FlowMapper extends BaseMapper <Flow> {

    String getTaskIdByprocInstId(String procInsId);

    @InterceptorIgnore(tenantLine = "true")
    int updateProcInsIdByBusinessId(Flow act);

    /**
     * 根据流程id查询流程信息
     * @param taskId
     * @return
     */
    ActRuTaskInfo getTaskInfoByTaskId(String taskId);

    /**
     * 查询流程对应租户id
     * @param procDefKey
     * @return
     */
    String getTenantIdByProcDefKey(String procDefKey);

    /**
     * 根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
     * @param procDefId
     * @return
     */
    String getActNameByDefId(@Param("procDefId") String procDefId);
}
