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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.flowable.model.ActHiIdentitylink;
import com.jeeplus.flowable.model.ActRuTaskInfo;
import com.jeeplus.flowable.model.Flow;
import com.jeeplus.flowable.vo.AssigneeDto;
import com.jeeplus.flowable.vo.HisTaskVo;
import org.apache.ibatis.annotations.Param;
import org.flowable.task.api.history.HistoricTaskInstance;

import java.util.List;

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

    int updateProcInsIdByBusinessId(Flow act);

    /**
     * 根据流程id查询流程信息
     * @param processInstanceId
     * @return
     */
    List<ActHiIdentitylink> getActHiIdentitylinkList(String processInstanceId);

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

    String getTaskIdByprocInstId(String procInsId);

    List<AssigneeDto> getAssigneeDtoByTaskId(String taskId);

    String getStarterByProcInsId(String procInsId);

    Page<HisTaskVo> getHistoricList(Page<HisTaskVo> page, @Param(Constants.WRAPPER) QueryWrapper<HisTaskVo> queryWrapper);
}
