<?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="io.dataease.base.mapper.MyPluginMapper">
  <resultMap id="BaseResultMap" type="io.dataease.base.domain.MyPlugin">
    <id column="plugin_id" jdbcType="BIGINT" property="pluginId" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="free" jdbcType="BIT" property="free" />
    <result column="cost" jdbcType="INTEGER" property="cost" />
    <result column="descript" jdbcType="VARCHAR" property="descript" />
    <result column="version" jdbcType="VARCHAR" property="version" />
    <result column="install_type" jdbcType="INTEGER" property="installType" />
    <result column="creator" jdbcType="VARCHAR" property="creator" />
    <result column="release_time" jdbcType="BIGINT" property="releaseTime" />
    <result column="install_time" jdbcType="BIGINT" property="installTime" />
    <result column="module_name" jdbcType="VARCHAR" property="moduleName" />
    <result column="bean_name" jdbcType="VARCHAR" property="beanName" />
    <result column="icon" jdbcType="VARCHAR" property="icon" />
  </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">
    plugin_id, `name`, `free`, cost, descript, version, install_type, creator, release_time, 
    install_time, module_name, bean_name, icon
  </sql>
  <select id="selectByExample" parameterType="io.dataease.base.domain.MyPluginExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from my_plugin
    <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.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from my_plugin
    where plugin_id = #{pluginId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from my_plugin
    where plugin_id = #{pluginId,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="io.dataease.base.domain.MyPluginExample">
    delete from my_plugin
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="io.dataease.base.domain.MyPlugin">
    insert into my_plugin (plugin_id, `name`, `free`, 
      cost, descript, version, 
      install_type, creator, release_time, 
      install_time, module_name, bean_name, 
      icon)
    values (#{pluginId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{free,jdbcType=BIT}, 
      #{cost,jdbcType=INTEGER}, #{descript,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, 
      #{installType,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{releaseTime,jdbcType=BIGINT}, 
      #{installTime,jdbcType=BIGINT}, #{moduleName,jdbcType=VARCHAR}, #{beanName,jdbcType=VARCHAR}, 
      #{icon,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="io.dataease.base.domain.MyPlugin">
    insert into my_plugin
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="pluginId != null">
        plugin_id,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="free != null">
        `free`,
      </if>
      <if test="cost != null">
        cost,
      </if>
      <if test="descript != null">
        descript,
      </if>
      <if test="version != null">
        version,
      </if>
      <if test="installType != null">
        install_type,
      </if>
      <if test="creator != null">
        creator,
      </if>
      <if test="releaseTime != null">
        release_time,
      </if>
      <if test="installTime != null">
        install_time,
      </if>
      <if test="moduleName != null">
        module_name,
      </if>
      <if test="beanName != null">
        bean_name,
      </if>
      <if test="icon != null">
        icon,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="pluginId != null">
        #{pluginId,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="free != null">
        #{free,jdbcType=BIT},
      </if>
      <if test="cost != null">
        #{cost,jdbcType=INTEGER},
      </if>
      <if test="descript != null">
        #{descript,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        #{version,jdbcType=VARCHAR},
      </if>
      <if test="installType != null">
        #{installType,jdbcType=INTEGER},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="releaseTime != null">
        #{releaseTime,jdbcType=BIGINT},
      </if>
      <if test="installTime != null">
        #{installTime,jdbcType=BIGINT},
      </if>
      <if test="moduleName != null">
        #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="beanName != null">
        #{beanName,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        #{icon,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="io.dataease.base.domain.MyPluginExample" resultType="java.lang.Long">
    select count(*) from my_plugin
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update my_plugin
    <set>
      <if test="record.pluginId != null">
        plugin_id = #{record.pluginId,jdbcType=BIGINT},
      </if>
      <if test="record.name != null">
        `name` = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.free != null">
        `free` = #{record.free,jdbcType=BIT},
      </if>
      <if test="record.cost != null">
        cost = #{record.cost,jdbcType=INTEGER},
      </if>
      <if test="record.descript != null">
        descript = #{record.descript,jdbcType=VARCHAR},
      </if>
      <if test="record.version != null">
        version = #{record.version,jdbcType=VARCHAR},
      </if>
      <if test="record.installType != null">
        install_type = #{record.installType,jdbcType=INTEGER},
      </if>
      <if test="record.creator != null">
        creator = #{record.creator,jdbcType=VARCHAR},
      </if>
      <if test="record.releaseTime != null">
        release_time = #{record.releaseTime,jdbcType=BIGINT},
      </if>
      <if test="record.installTime != null">
        install_time = #{record.installTime,jdbcType=BIGINT},
      </if>
      <if test="record.moduleName != null">
        module_name = #{record.moduleName,jdbcType=VARCHAR},
      </if>
      <if test="record.beanName != null">
        bean_name = #{record.beanName,jdbcType=VARCHAR},
      </if>
      <if test="record.icon != null">
        icon = #{record.icon,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update my_plugin
    set plugin_id = #{record.pluginId,jdbcType=BIGINT},
      `name` = #{record.name,jdbcType=VARCHAR},
      `free` = #{record.free,jdbcType=BIT},
      cost = #{record.cost,jdbcType=INTEGER},
      descript = #{record.descript,jdbcType=VARCHAR},
      version = #{record.version,jdbcType=VARCHAR},
      install_type = #{record.installType,jdbcType=INTEGER},
      creator = #{record.creator,jdbcType=VARCHAR},
      release_time = #{record.releaseTime,jdbcType=BIGINT},
      install_time = #{record.installTime,jdbcType=BIGINT},
      module_name = #{record.moduleName,jdbcType=VARCHAR},
      bean_name = #{record.beanName,jdbcType=VARCHAR},
      icon = #{record.icon,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.MyPlugin">
    update my_plugin
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="free != null">
        `free` = #{free,jdbcType=BIT},
      </if>
      <if test="cost != null">
        cost = #{cost,jdbcType=INTEGER},
      </if>
      <if test="descript != null">
        descript = #{descript,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        version = #{version,jdbcType=VARCHAR},
      </if>
      <if test="installType != null">
        install_type = #{installType,jdbcType=INTEGER},
      </if>
      <if test="creator != null">
        creator = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="releaseTime != null">
        release_time = #{releaseTime,jdbcType=BIGINT},
      </if>
      <if test="installTime != null">
        install_time = #{installTime,jdbcType=BIGINT},
      </if>
      <if test="moduleName != null">
        module_name = #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="beanName != null">
        bean_name = #{beanName,jdbcType=VARCHAR},
      </if>
      <if test="icon != null">
        icon = #{icon,jdbcType=VARCHAR},
      </if>
    </set>
    where plugin_id = #{pluginId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.MyPlugin">
    update my_plugin
    set `name` = #{name,jdbcType=VARCHAR},
      `free` = #{free,jdbcType=BIT},
      cost = #{cost,jdbcType=INTEGER},
      descript = #{descript,jdbcType=VARCHAR},
      version = #{version,jdbcType=VARCHAR},
      install_type = #{installType,jdbcType=INTEGER},
      creator = #{creator,jdbcType=VARCHAR},
      release_time = #{releaseTime,jdbcType=BIGINT},
      install_time = #{installTime,jdbcType=BIGINT},
      module_name = #{moduleName,jdbcType=VARCHAR},
      bean_name = #{beanName,jdbcType=VARCHAR},
      icon = #{icon,jdbcType=VARCHAR}
    where plugin_id = #{pluginId,jdbcType=BIGINT}
  </update>
</mapper>