<?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="net.lab1024.smartadmin.module.support.quartz.dao.QuartzTaskDao">

    <resultMap id="QuartzTaskDTO"
               type="net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskEntity"></resultMap>

    <sql id="baseSql">
        t.id,
        t.task_name,
        t.task_bean,
        t.task_params,
        t.task_cron,
        t.task_status,
        t.remark,
        t.update_time,
        t.create_time
    </sql>


    <select id="queryList" resultMap="QuartzTaskDTO">
        SELECT
        <include refid="baseSql"></include>
        FROM
        t_quartz_task t
    </select>


    <update id="updateStatus">
        UPDATE t_quartz_task t
        set t.task_status = #{taskStatus}
        WHERE t.id = #{taskId}
    </update>


</mapper>