ConsultVulmanageSyncEntityMapper.xml 13.5 KB
<?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.idss.vulsync.mvc.mapper.ConsultVulmanageSyncEntityMapper" >
  <resultMap id="BaseResultMap" type="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntity" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="trans_id" property="transId" jdbcType="VARCHAR" />
    <result column="file_path" property="filePath" jdbcType="VARCHAR" />
    <result column="user" property="user" jdbcType="VARCHAR" />
    <result column="credit_type" property="creditType" jdbcType="VARCHAR" />
    <result column="credit" property="credit" jdbcType="VARCHAR" />
    <result column="pub_key" property="pubKey" jdbcType="VARCHAR" />
    <result column="init_delay" property="initDelay" jdbcType="VARCHAR" />
    <result column="upd_cycle" property="updCycle" jdbcType="VARCHAR" />
    <result column="init_file_path" property="initFilePath" jdbcType="VARCHAR" />
    <result column="latest_file_path" property="latestFilePath" jdbcType="VARCHAR" />
    <result column="latest_es_id" property="latestEsId" jdbcType="VARCHAR" />
    <result column="latest_upload_time" property="latestUploadTime" jdbcType="TIMESTAMP" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, trans_id, file_path, "user", credit_type, credit, pub_key, init_delay, upd_cycle,
    init_file_path, latest_file_path, latest_es_id, latest_upload_time, create_time
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntityExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from consult_vulmanage_sync
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select
    <include refid="Base_Column_List" />
    from consult_vulmanage_sync
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from consult_vulmanage_sync
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntityExample" >
    delete from consult_vulmanage_sync
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntity" >
    insert into consult_vulmanage_sync (id, trans_id, file_path,
      "user", credit_type, credit,
      pub_key, init_delay, upd_cycle,
      init_file_path, latest_file_path, latest_es_id,
      latest_upload_time, create_time)
    values (#{id,jdbcType=VARCHAR}, #{transId,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR},
      #{user,jdbcType=VARCHAR}, #{creditType,jdbcType=VARCHAR}, #{credit,jdbcType=VARCHAR},
      #{pubKey,jdbcType=VARCHAR}, #{initDelay,jdbcType=VARCHAR}, #{updCycle,jdbcType=VARCHAR},
      #{initFilePath,jdbcType=VARCHAR}, #{latestFilePath,jdbcType=VARCHAR}, #{latestEsId,jdbcType=VARCHAR},
      #{latestUploadTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntity" >
    insert into consult_vulmanage_sync
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="transId != null" >
        trans_id,
      </if>
      <if test="filePath != null" >
        file_path,
      </if>
      <if test="user != null" >
        "user",
      </if>
      <if test="creditType != null" >
        credit_type,
      </if>
      <if test="credit != null" >
        credit,
      </if>
      <if test="pubKey != null" >
        pub_key,
      </if>
      <if test="initDelay != null" >
        init_delay,
      </if>
      <if test="updCycle != null" >
        upd_cycle,
      </if>
      <if test="initFilePath != null" >
        init_file_path,
      </if>
      <if test="latestFilePath != null" >
        latest_file_path,
      </if>
      <if test="latestEsId != null" >
        latest_es_id,
      </if>
      <if test="latestUploadTime != null" >
        latest_upload_time,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="transId != null" >
        #{transId,jdbcType=VARCHAR},
      </if>
      <if test="filePath != null" >
        #{filePath,jdbcType=VARCHAR},
      </if>
      <if test="user != null" >
        #{user,jdbcType=VARCHAR},
      </if>
      <if test="creditType != null" >
        #{creditType,jdbcType=VARCHAR},
      </if>
      <if test="credit != null" >
        #{credit,jdbcType=VARCHAR},
      </if>
      <if test="pubKey != null" >
        #{pubKey,jdbcType=VARCHAR},
      </if>
      <if test="initDelay != null" >
        #{initDelay,jdbcType=VARCHAR},
      </if>
      <if test="updCycle != null" >
        #{updCycle,jdbcType=VARCHAR},
      </if>
      <if test="initFilePath != null" >
        #{initFilePath,jdbcType=VARCHAR},
      </if>
      <if test="latestFilePath != null" >
        #{latestFilePath,jdbcType=VARCHAR},
      </if>
      <if test="latestEsId != null" >
        #{latestEsId,jdbcType=VARCHAR},
      </if>
      <if test="latestUploadTime != null" >
        #{latestUploadTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntityExample" resultType="java.lang.Integer" >
    select count(*) from consult_vulmanage_sync
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update consult_vulmanage_sync
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.transId != null" >
        trans_id = #{record.transId,jdbcType=VARCHAR},
      </if>
      <if test="record.filePath != null" >
        file_path = #{record.filePath,jdbcType=VARCHAR},
      </if>
      <if test="record.user != null" >
        "user" = #{record.user,jdbcType=VARCHAR},
      </if>
      <if test="record.creditType != null" >
        credit_type = #{record.creditType,jdbcType=VARCHAR},
      </if>
      <if test="record.credit != null" >
        credit = #{record.credit,jdbcType=VARCHAR},
      </if>
      <if test="record.pubKey != null" >
        pub_key = #{record.pubKey,jdbcType=VARCHAR},
      </if>
      <if test="record.initDelay != null" >
        init_delay = #{record.initDelay,jdbcType=VARCHAR},
      </if>
      <if test="record.updCycle != null" >
        upd_cycle = #{record.updCycle,jdbcType=VARCHAR},
      </if>
      <if test="record.initFilePath != null" >
        init_file_path = #{record.initFilePath,jdbcType=VARCHAR},
      </if>
      <if test="record.latestFilePath != null" >
        latest_file_path = #{record.latestFilePath,jdbcType=VARCHAR},
      </if>
      <if test="record.latestEsId != null" >
        latest_es_id = #{record.latestEsId,jdbcType=VARCHAR},
      </if>
      <if test="record.latestUploadTime != null" >
        latest_upload_time = #{record.latestUploadTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createTime != null" >
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update consult_vulmanage_sync
    set id = #{record.id,jdbcType=VARCHAR},
      trans_id = #{record.transId,jdbcType=VARCHAR},
      file_path = #{record.filePath,jdbcType=VARCHAR},
      "user" = #{record.user,jdbcType=VARCHAR},
      credit_type = #{record.creditType,jdbcType=VARCHAR},
      credit = #{record.credit,jdbcType=VARCHAR},
      pub_key = #{record.pubKey,jdbcType=VARCHAR},
      init_delay = #{record.initDelay,jdbcType=VARCHAR},
      upd_cycle = #{record.updCycle,jdbcType=VARCHAR},
      init_file_path = #{record.initFilePath,jdbcType=VARCHAR},
      latest_file_path = #{record.latestFilePath,jdbcType=VARCHAR},
      latest_es_id = #{record.latestEsId,jdbcType=VARCHAR},
      latest_upload_time = #{record.latestUploadTime,jdbcType=TIMESTAMP},
      create_time = #{record.createTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntity" >
    update consult_vulmanage_sync
    <set >
      <if test="transId != null" >
        trans_id = #{transId,jdbcType=VARCHAR},
      </if>
      <if test="filePath != null" >
        file_path = #{filePath,jdbcType=VARCHAR},
      </if>
      <if test="user != null" >
        "user" = #{user,jdbcType=VARCHAR},
      </if>
      <if test="creditType != null" >
        credit_type = #{creditType,jdbcType=VARCHAR},
      </if>
      <if test="credit != null" >
        credit = #{credit,jdbcType=VARCHAR},
      </if>
      <if test="pubKey != null" >
        pub_key = #{pubKey,jdbcType=VARCHAR},
      </if>
      <if test="initDelay != null" >
        init_delay = #{initDelay,jdbcType=VARCHAR},
      </if>
      <if test="updCycle != null" >
        upd_cycle = #{updCycle,jdbcType=VARCHAR},
      </if>
      <if test="initFilePath != null" >
        init_file_path = #{initFilePath,jdbcType=VARCHAR},
      </if>
      <if test="latestFilePath != null" >
        latest_file_path = #{latestFilePath,jdbcType=VARCHAR},
      </if>
      <if test="latestEsId != null" >
        latest_es_id = #{latestEsId,jdbcType=VARCHAR},
      </if>
      <if test="latestUploadTime != null" >
        latest_upload_time = #{latestUploadTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.idss.vulsync.mvc.pojo.db.ConsultVulmanageSyncEntity" >
    update consult_vulmanage_sync
    set trans_id = #{transId,jdbcType=VARCHAR},
      file_path = #{filePath,jdbcType=VARCHAR},
      "user" = #{user,jdbcType=VARCHAR},
      credit_type = #{creditType,jdbcType=VARCHAR},
      credit = #{credit,jdbcType=VARCHAR},
      pub_key = #{pubKey,jdbcType=VARCHAR},
      init_delay = #{initDelay,jdbcType=VARCHAR},
      upd_cycle = #{updCycle,jdbcType=VARCHAR},
      init_file_path = #{initFilePath,jdbcType=VARCHAR},
      latest_file_path = #{latestFilePath,jdbcType=VARCHAR},
      latest_es_id = #{latestEsId,jdbcType=VARCHAR},
      latest_upload_time = #{latestUploadTime,jdbcType=TIMESTAMP},
      create_time = #{createTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>