<?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.gyee.frame.mapper.auto.SysQuartzJobLogMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.SysQuartzJobLog">
    <result column="id" jdbcType="VARCHAR" property="id" />
    <result column="job_name" jdbcType="VARCHAR" property="jobName" />
    <result column="job_group" jdbcType="VARCHAR" property="jobGroup" />
    <result column="invoke_target" jdbcType="VARCHAR" property="invokeTarget" />
    <result column="job_message" jdbcType="VARCHAR" property="jobMessage" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="exception_info" jdbcType="VARCHAR" property="exceptionInfo" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
<sql id="Base_Column_List">
	  	  	      	id,
       	  	      	job_name,
       	  	      	job_group,
       	  	      	invoke_target,
       	  	      	job_message,
       	  	      	status,
       	  	      	exception_info,
       	  	      	start_time,
       	  	    	  	end_time
       	</sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.SysQuartzJobLogExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_sys_quartz_job_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from t_sys_quartz_job_log
    where id = #{id,jdbcType=VARCHAR}
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from t_sys_quartz_job_log
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.SysQuartzJobLogExample">
    delete from t_sys_quartz_job_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  
  <insert id="insert" parameterType="com.gyee.frame.model.auto.SysQuartzJobLog">
    insert into t_sys_quartz_job_log (
      	  	       id,
       	  	       job_name,
       	  	       job_group,
       	  	       invoke_target,
       	  	       job_message,
       	  	       status,
       	  	       exception_info,
       	  	       start_time,
       	  	    	  end_time
       	    )
    values (
	  	  	      	#{id,jdbcType=VARCHAR},
       	  	      	#{jobName,jdbcType=VARCHAR},
       	  	      	#{jobGroup,jdbcType=VARCHAR},
       	  	      	#{invokeTarget,jdbcType=VARCHAR},
       	  	      	#{jobMessage,jdbcType=VARCHAR},
       	  	      	#{status,jdbcType=INTEGER},
       	  	      	#{exceptionInfo,jdbcType=VARCHAR},
       	  	      	#{startTime,jdbcType=TIMESTAMP},
       	  	    	  #{endTime,jdbcType=TIMESTAMP}
       	    )
  </insert>
  
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.SysQuartzJobLog">
    insert into t_sys_quartz_job_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
          
      <if test="id != null">
        id,
      </if>
      
         
      <if test="jobName != null">
        job_name,
      </if>
      
         
      <if test="jobGroup != null">
        job_group,
      </if>
      
         
      <if test="invokeTarget != null">
        invoke_target,
      </if>
      
         
      <if test="jobMessage != null">
        job_message,
      </if>
      
         
      <if test="status != null">
        status,
      </if>
      
         
      <if test="exceptionInfo != null">
        exception_info,
      </if>
      
         
      <if test="startTime != null">
        start_time,
      </if>
      
         
      <if test="endTime != null">
        end_time,
      </if>
      
         </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
          <if test="jobName != null">
        #{jobName,jdbcType=VARCHAR},
      </if>
          <if test="jobGroup != null">
        #{jobGroup,jdbcType=VARCHAR},
      </if>
          <if test="invokeTarget != null">
        #{invokeTarget,jdbcType=VARCHAR},
      </if>
          <if test="jobMessage != null">
        #{jobMessage,jdbcType=VARCHAR},
      </if>
          <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
          <if test="exceptionInfo != null">
        #{exceptionInfo,jdbcType=VARCHAR},
      </if>
          <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
          <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
        </trim>
  </insert>
  
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.SysQuartzJobLogExample" resultType="java.lang.Long">
    select count(*) from t_sys_quartz_job_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  
  <update id="updateByExampleSelective" parameterType="map">
    update t_sys_quartz_job_log
    <set>
          <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
          <if test="record.jobName != null">
        job_name = #{record.jobName,jdbcType=VARCHAR},
      </if>
          <if test="record.jobGroup != null">
        job_group = #{record.jobGroup,jdbcType=VARCHAR},
      </if>
          <if test="record.invokeTarget != null">
        invoke_target = #{record.invokeTarget,jdbcType=VARCHAR},
      </if>
          <if test="record.jobMessage != null">
        job_message = #{record.jobMessage,jdbcType=VARCHAR},
      </if>
          <if test="record.status != null">
        status = #{record.status,jdbcType=INTEGER},
      </if>
          <if test="record.exceptionInfo != null">
        exception_info = #{record.exceptionInfo,jdbcType=VARCHAR},
      </if>
          <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
          <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
         
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
  <update id="updateByExample" parameterType="map">
    update t_sys_quartz_job_log
    set
            	     	 id = #{record.id,jdbcType=VARCHAR},
    	         	     	 job_name = #{record.jobName,jdbcType=VARCHAR},
    	         	     	 job_group = #{record.jobGroup,jdbcType=VARCHAR},
    	         	     	 invoke_target = #{record.invokeTarget,jdbcType=VARCHAR},
    	         	     	 job_message = #{record.jobMessage,jdbcType=VARCHAR},
    	         	     	 status = #{record.status,jdbcType=INTEGER},
    	         	     	 exception_info = #{record.exceptionInfo,jdbcType=VARCHAR},
    	         	     	 start_time = #{record.startTime,jdbcType=TIMESTAMP},
    	         	     	 end_time = #{record.endTime,jdbcType=TIMESTAMP}
    	         <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
      <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.SysQuartzJobLog">
    update t_sys_quartz_job_log
    <set>
                          <if test="jobName != null">
        job_name = #{jobName,jdbcType=VARCHAR},
      </if>
                      <if test="jobGroup != null">
        job_group = #{jobGroup,jdbcType=VARCHAR},
      </if>
                      <if test="invokeTarget != null">
        invoke_target = #{invokeTarget,jdbcType=VARCHAR},
      </if>
                      <if test="jobMessage != null">
        job_message = #{jobMessage,jdbcType=VARCHAR},
      </if>
                      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
                      <if test="exceptionInfo != null">
        exception_info = #{exceptionInfo,jdbcType=VARCHAR},
      </if>
                      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
                      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
              </set>
    where 
            id = #{id,jdbcType=VARCHAR}
                                                                          
  </update>

      	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	

  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.SysQuartzJobLog">
    update t_sys_quartz_job_log
    set 
             	        	    	 			job_name = #{jobName,jdbcType=VARCHAR},
		     	        	    	 			job_group = #{jobGroup,jdbcType=VARCHAR},
		     	        	    	 			invoke_target = #{invokeTarget,jdbcType=VARCHAR},
		     	        	    	 			job_message = #{jobMessage,jdbcType=VARCHAR},
		     	        	    	 			status = #{status,jdbcType=INTEGER},
		     	        	    	 			exception_info = #{exceptionInfo,jdbcType=VARCHAR},
		     	        	    	 			start_time = #{startTime,jdbcType=TIMESTAMP},
		     	        	    	 			end_time = #{endTime,jdbcType=TIMESTAMP}
		     	        where 
            id = #{id,jdbcType=VARCHAR}
                                                                            
  </update>
  
                                                 
</mapper>