package com.qmth.distributed.print.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
import com.qmth.distributed.print.business.entity.TFFlow;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * 流程表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
public interface TFFlowMapper extends BaseMapper<TFFlow> {

    /**
     * 流程列表
     *
     * @param iPage
     * @param name
     * @param schoolId
     * @param orgId
     * @return
     */
    IPage<TFFlow> list(IPage<Map> iPage, @Param("name") String name, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId);

    /**
     * 流程审批记录列表
     *
     * @param iPage
     * @param startName
     * @param schoolId
     * @param orgId
     * @param flowId
     * @return
     */
    IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, @Param("startName") String startName, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId, @Param("flowId") Long flowId);

    /**
     * 根据key查找id
     *
     * @param flowKey
     * @return
     */
    public String findActIdByFlowKey(@Param("flowKey") String flowKey);
}
