<?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.qmth.exam.reserve.dao.AsyncTaskDao">

    <select id="pageAsyncTask" resultType="com.qmth.exam.reserve.bean.asynctask.AsyncTaskVO">
        SELECT
        t.create_time createTime,
        t.update_time updateTime,
        t.type,
        t.STATUS,
        t.result,
        t.summary,
        t.import_file_path importFilePath,
        t.export_file_path exportFilePath,
        concat( u.NAME, '(', u.login_name, ')' ) operator
        FROM
        t_async_task t,
        t_user u
        WHERE
        t.operate_id = u.id
        <if test="req.operateId != null">
            and t.operate_id=#{req.operateId}
        </if>
        order by t.update_time desc
    </select>

</mapper>
