<?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.chaozhanggui.dao.system.dao.TbPlussAppVersionInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAppVersionInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="platformCode" jdbcType="INTEGER" property="platformcode" />
    <result column="platformName" jdbcType="VARCHAR" property="platformname" />
    <result column="versionCode" jdbcType="INTEGER" property="versioncode" />
    <result column="versionName" jdbcType="VARCHAR" property="versionname" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="updateInfo" jdbcType="VARCHAR" property="updateinfo" />
    <result column="forceUpdate" jdbcType="TINYINT" property="forceupdate" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, platformCode, platformName, versionCode, versionName, url, updateInfo, forceUpdate, 
    createTime, updateTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_app_version_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_app_version_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppVersionInfo">
    insert into tb_pluss_app_version_info (id, platformCode, platformName, 
      versionCode, versionName, url, 
      updateInfo, forceUpdate, createTime, 
      updateTime)
    values (#{id,jdbcType=INTEGER}, #{platformcode,jdbcType=INTEGER}, #{platformname,jdbcType=VARCHAR}, 
      #{versioncode,jdbcType=INTEGER}, #{versionname,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, 
      #{updateinfo,jdbcType=VARCHAR}, #{forceupdate,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP}, 
      #{updatetime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppVersionInfo">
    insert into tb_pluss_app_version_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="platformcode != null">
        platformCode,
      </if>
      <if test="platformname != null">
        platformName,
      </if>
      <if test="versioncode != null">
        versionCode,
      </if>
      <if test="versionname != null">
        versionName,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="updateinfo != null">
        updateInfo,
      </if>
      <if test="forceupdate != null">
        forceUpdate,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="platformcode != null">
        #{platformcode,jdbcType=INTEGER},
      </if>
      <if test="platformname != null">
        #{platformname,jdbcType=VARCHAR},
      </if>
      <if test="versioncode != null">
        #{versioncode,jdbcType=INTEGER},
      </if>
      <if test="versionname != null">
        #{versionname,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="updateinfo != null">
        #{updateinfo,jdbcType=VARCHAR},
      </if>
      <if test="forceupdate != null">
        #{forceupdate,jdbcType=TINYINT},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppVersionInfo">
    update tb_pluss_app_version_info
    <set>
      <if test="platformcode != null">
        platformCode = #{platformcode,jdbcType=INTEGER},
      </if>
      <if test="platformname != null">
        platformName = #{platformname,jdbcType=VARCHAR},
      </if>
      <if test="versioncode != null">
        versionCode = #{versioncode,jdbcType=INTEGER},
      </if>
      <if test="versionname != null">
        versionName = #{versionname,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="updateinfo != null">
        updateInfo = #{updateinfo,jdbcType=VARCHAR},
      </if>
      <if test="forceupdate != null">
        forceUpdate = #{forceupdate,jdbcType=TINYINT},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppVersionInfo">
    update tb_pluss_app_version_info
    set platformCode = #{platformcode,jdbcType=INTEGER},
      platformName = #{platformname,jdbcType=VARCHAR},
      versionCode = #{versioncode,jdbcType=INTEGER},
      versionName = #{versionname,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      updateInfo = #{updateinfo,jdbcType=VARCHAR},
      forceUpdate = #{forceupdate,jdbcType=TINYINT},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>