<?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.TbPlussAppletStoreMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAppletStore">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="storeName" jdbcType="VARCHAR" property="storename" />
    <result column="icon" jdbcType="VARCHAR" property="icon" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
    <result column="type" jdbcType="INTEGER" property="type" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="appId" jdbcType="VARCHAR" property="appid" />
  </resultMap>
  <sql id="Base_Column_List">
    id, storeName, icon, sort, type, url, createTime, appId
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_applet_store
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_applet_store
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletStore">
    insert into tb_pluss_applet_store (id, storeName, icon, 
      sort, type, url, createTime, 
      appId)
    values (#{id,jdbcType=INTEGER}, #{storename,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, 
      #{sort,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, 
      #{appid,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletStore">
    insert into tb_pluss_applet_store
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="storename != null">
        storeName,
      </if>
      <if test="icon != null">
        icon,
      </if>
      <if test="sort != null">
        sort,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="appid != null">
        appId,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="storename != null">
        #{storename,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        #{icon,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        #{type,jdbcType=INTEGER},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="appid != null">
        #{appid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletStore">
    update tb_pluss_applet_store
    <set>
      <if test="storename != null">
        storeName = #{storename,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        icon = #{icon,jdbcType=VARCHAR},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=INTEGER},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="appid != null">
        appId = #{appid,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletStore">
    update tb_pluss_applet_store
    set storeName = #{storename,jdbcType=VARCHAR},
      icon = #{icon,jdbcType=VARCHAR},
      sort = #{sort,jdbcType=INTEGER},
      type = #{type,jdbcType=INTEGER},
      url = #{url,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      appId = #{appid,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>