All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mapper.base.SysTaskLogMapper.xml Maven / Gradle / Ivy

The newest version!
<?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="system.mapper.SysTaskLogMapper">
  <resultMap id="BaseResultMap" type="system.entity.SysTaskLog">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="task_id" jdbcType="BIGINT" property="taskId" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="actuator" jdbcType="VARCHAR" property="actuator" />
    <result column="schedule" jdbcType="VARCHAR" property="schedule" />
    <result column="param" jdbcType="VARCHAR" property="param" />
    <result column="run_status" jdbcType="VARCHAR" property="runStatus" />
    <result column="run_hostname" jdbcType="VARCHAR" property="runHostname" />
    <result column="run_env_name" jdbcType="VARCHAR" property="runEnvName" />
    <result column="run_remarks" jdbcType="VARCHAR" property="runRemarks" />
    <result column="run_time_start" jdbcType="TIMESTAMP" property="runTimeStart" />
    <result column="run_time_end" jdbcType="TIMESTAMP" property="runTimeEnd" />
    <result column="log_path" jdbcType="VARCHAR" property="logPath" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, task_id, name, create_time, actuator, schedule, param, run_status, run_hostname, 
    run_env_name, run_remarks, run_time_start, run_time_end, log_path
  </sql>
  <sql id="All_Column_List">
    id, task_id, name, create_time, actuator, schedule, param, run_status, run_hostname, 
    run_env_name, run_remarks, run_time_start, run_time_end, log_path
  </sql>
  <sql id="whereAll">
    <if test="id != null and id != '' ">
       AND id = #{id,jdbcType=VARCHAR}
    </if>
    <if test="taskId != null ">
       AND task_id = #{taskId,jdbcType=BIGINT}
    </if>
    <if test="name != null and name != '' ">
       AND name = #{name,jdbcType=VARCHAR}
    </if>
    <if test="createTime != null ">
       AND create_time = #{createTime,jdbcType=TIMESTAMP}
    </if>
    <if test="actuator != null and actuator != '' ">
       AND actuator = #{actuator,jdbcType=VARCHAR}
    </if>
    <if test="schedule != null and schedule != '' ">
       AND schedule = #{schedule,jdbcType=VARCHAR}
    </if>
    <if test="param != null and param != '' ">
       AND param = #{param,jdbcType=VARCHAR}
    </if>
    <if test="runStatus != null ">
       AND run_status = #{runStatus,jdbcType=VARCHAR}
    </if>
    <if test="runHostname != null and runHostname != '' ">
       AND run_hostname = #{runHostname,jdbcType=VARCHAR}
    </if>
    <if test="runEnvName != null and runEnvName != '' ">
       AND run_env_name = #{runEnvName,jdbcType=VARCHAR}
    </if>
    <if test="runRemarks != null and runRemarks != '' ">
       AND run_remarks = #{runRemarks,jdbcType=VARCHAR}
    </if>
    <if test="runTimeStart != null ">
       AND run_time_start = #{runTimeStart,jdbcType=TIMESTAMP}
    </if>
    <if test="runTimeEnd != null ">
       AND run_time_end = #{runTimeEnd,jdbcType=TIMESTAMP}
    </if>
    <if test="logPath != null and logPath != '' ">
       AND log_path = #{logPath,jdbcType=VARCHAR}
    </if>
  </sql>
  <sql id="setAll">
    <if test="taskId != null ">
      task_id = #{taskId,jdbcType=BIGINT},
    </if>
    <if test="name != null ">
      name = #{name,jdbcType=VARCHAR},
    </if>
    <if test="createTime != null ">
      create_time = #{createTime,jdbcType=TIMESTAMP},
    </if>
    <if test="actuator != null ">
      actuator = #{actuator,jdbcType=VARCHAR},
    </if>
    <if test="schedule != null ">
      schedule = #{schedule,jdbcType=VARCHAR},
    </if>
    <if test="param != null ">
      param = #{param,jdbcType=VARCHAR},
    </if>
    <if test="runStatus != null ">
      run_status = #{runStatus,jdbcType=VARCHAR},
    </if>
    <if test="runHostname != null ">
      run_hostname = #{runHostname,jdbcType=VARCHAR},
    </if>
    <if test="runEnvName != null ">
      run_env_name = #{runEnvName,jdbcType=VARCHAR},
    </if>
    <if test="runRemarks != null ">
      run_remarks = #{runRemarks,jdbcType=VARCHAR},
    </if>
    <if test="runTimeStart != null ">
      run_time_start = #{runTimeStart,jdbcType=TIMESTAMP},
    </if>
    <if test="runTimeEnd != null ">
      run_time_end = #{runTimeEnd,jdbcType=TIMESTAMP},
    </if>
    <if test="logPath != null ">
      log_path = #{logPath,jdbcType=VARCHAR},
    </if>
  </sql>
  <select id="loadByIds" resultType="system.entity.SysTaskLog">
    SELECT
    <include refid="All_Column_List" />
    FROM sys_task_log
    <where>
        <choose>
            <when test="ids != null and ids.size() != 0">
                id IN 
                <foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">#{id}</foreach>
            </when>
            <otherwise>
                1 = 0
            </otherwise>
        </choose>
    </where>
  </select>
  <select id="loadByNotIds" resultType="system.entity.SysTaskLog">
    SELECT
    <include refid="All_Column_List" />
    FROM sys_task_log
    <where>
        <choose>
            <when test="ids != null and ids.size() != 0">
                id NOT IN 
                <foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">#{id}</foreach>
            </when>
            <otherwise>
                1 = 0
            </otherwise>
        </choose>
    </where>
  </select>
  <delete id="deleteByIds">
    DELETE FROM sys_task_log 
    <where>
        <choose>
            <when test="ids != null and ids.size() != 0">
                id IN 
                <foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">#{id}</foreach>
            </when>
            <otherwise>
                1 = 0
            </otherwise>
        </choose>
    </where>
  </delete>
  <delete id="deleteByNotIds">
    DELETE FROM sys_task_log 
    <where>
        <choose>
            <when test="ids != null and ids.size() != 0">
                id NOT IN 
                <foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">#{id}</foreach>
            </when>
            <otherwise>
                1 = 0
            </otherwise>
        </choose>
    </where>
  </delete>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy