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.FlowApproveListResult;
import com.qmth.distributed.print.business.entity.TFFlowApprove;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

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

    /**
     * 根据流程id查询流程状态
     *
     * @param flowId
     * @return
     */
    TFFlowApprove findByFlowId(@Param("flowId") Long flowId);

    /**
     * 查找流程审批记录列表
     *
     * @param iPage
     * @param status
     * @param teacherUserName
     * @param teachingRoomId
     * @param startTime
     * @param endTime
     * @param pendApproveUserName
     * @param schoolId
     * @param orgId
     * @return
     */
    public IPage<FlowApproveListResult> findApproveList(IPage<Map> iPage,
                                                        @Param("status") String status,
                                                        @Param("teacherUserName") String teacherUserName,
                                                        @Param("teachingRoomId") Long teachingRoomId,
                                                        @Param("startTime") Long startTime,
                                                        @Param("endTime") Long endTime,
                                                        @Param("pendApproveUserName") String pendApproveUserName,
                                                        @Param("schoolId") Long schoolId,
                                                        @Param("orgId") Long orgId);
}
