<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aizuda.snailjob.template.datasource.persistence.mapper.WorkflowTaskBatchMapper">

    <select id="selectWorkflowBatchPageList"
            parameterType="com.aizuda.snailjob.template.datasource.persistence.dataobject.WorkflowBatchQueryDO"
            resultType="com.aizuda.snailjob.template.datasource.persistence.dataobject.WorkflowBatchResponseDO">
        SELECT batch.*,
               flow.workflow_name
          FROM sj_workflow_task_batch batch
                JOIN sj_workflow flow ON batch.workflow_id = flow.id
        ${ew.customSqlSegment}
    </select>

    <select id="selectWorkflowBatchList"
        resultType="com.aizuda.snailjob.template.datasource.persistence.dataobject.WorkflowBatchResponseDO">
        SELECT batch.*,
               flow.workflow_name
        FROM sj_workflow_task_batch batch
                 JOIN sj_workflow flow ON batch.workflow_id = flow.id
            ${ew.customSqlSegment}
    </select>

</mapper>
