<?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.yifu.cloud.plus.v1.job.mapper.SysScheduleJobLogMapper">

    <resultMap id="sysScheduleJobLogMap" type="com.yifu.cloud.plus.v1.job.entity.SysScheduleJobLog">
        <id property="id" column="ID"/>
        <result property="jobId" column="JOB_ID"/>
        <result property="beanName" column="BEAN_NAME"/>
        <result property="methodName" column="METHOD_NAME"/>
        <result property="params" column="PARAMS"/>
        <result property="status" column="STATUS"/>
        <result property="error" column="ERROR"/>
        <result property="times" column="TIMES"/>
        <result property="createtime" column="CREATETIME"/>
        <result property="remark" column="REMARK"/>
    </resultMap>

    <!--sysScheduleJobLog简单分页查询-->
    <select id="getSysScheduleJobLogPage" resultMap="sysScheduleJobLogMap">
        SELECT
        ID,
        JOB_ID,
        BEAN_NAME,
        METHOD_NAME,
        PARAMS,
        STATUS,
        ERROR,
        TIMES,
        CREATETIME,
        REMARK
        FROM sys_schedule_job_log
        <where>1=1
            <if test="sysScheduleJobLog.id != null and sysScheduleJobLog.id.trim() != ''">
                AND ID = #{sysScheduleJobLog.id}
            </if>
            <if test="sysScheduleJobLog.jobId != null and sysScheduleJobLog.jobId.trim() != ''">
                AND JOB_ID = #{sysScheduleJobLog.jobId}
            </if>
            <if test="sysScheduleJobLog.beanName != null and sysScheduleJobLog.beanName.trim() != ''">
                AND BEAN_NAME = #{sysScheduleJobLog.beanName}
            </if>
            <if test="sysScheduleJobLog.methodName != null and sysScheduleJobLog.methodName.trim() != ''">
                AND METHOD_NAME = #{sysScheduleJobLog.methodName}
            </if>
            <if test="sysScheduleJobLog.params != null and sysScheduleJobLog.params.trim() != ''">
                AND PARAMS = #{sysScheduleJobLog.params}
            </if>
            <if test="sysScheduleJobLog.status != null and sysScheduleJobLog.status.trim() != ''">
                AND STATUS = #{sysScheduleJobLog.status}
            </if>
            <if test="sysScheduleJobLog.error != null and sysScheduleJobLog.error.trim() != ''">
                AND ERROR = #{sysScheduleJobLog.error}
            </if>
            <if test="sysScheduleJobLog.times != null and sysScheduleJobLog.times.trim() != ''">
                AND TIMES = #{sysScheduleJobLog.times}
            </if>
            <if test="sysScheduleJobLog.createtime != null and sysScheduleJobLog.createtime.trim() != ''">
                AND CREATETIME = #{sysScheduleJobLog.createtime}
            </if>
            <if test="sysScheduleJobLog.remark != null and sysScheduleJobLog.remark.trim() != ''">
                AND REMARK = #{sysScheduleJobLog.remark}
            </if>
        </where>
    </select>


</mapper>
