<?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.gyee.frame.mapper.auto.RMConfigMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.RMConfig">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="redisIndex" jdbcType="INTEGER" property="redisindex" />
    <result column="mongodbIndex" jdbcType="INTEGER" property="mongodbindex" />
    <result column="type" jdbcType="INTEGER" property="type" />
    <result column="model" jdbcType="INTEGER" property="model" />
    <result column="ukey" jdbcType="INTEGER" property="ukey" />
    <result column="collIndex" jdbcType="INTEGER" property="collindex" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, redisIndex, mongodbIndex, type, model, ukey, collIndex
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.RMConfigExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from rmconfig
    <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.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from rmconfig
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from rmconfig
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.RMConfigExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from rmconfig
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.RMConfig">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into rmconfig (id, redisIndex, mongodbIndex, 
      type, model, ukey, 
      collIndex)
    values (#{id,jdbcType=VARCHAR}, #{redisindex,jdbcType=INTEGER}, #{mongodbindex,jdbcType=INTEGER}, 
      #{type,jdbcType=INTEGER}, #{model,jdbcType=INTEGER}, #{ukey,jdbcType=INTEGER}, 
      #{collindex,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.RMConfig">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into rmconfig
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="redisindex != null">
        redisIndex,
      </if>
      <if test="mongodbindex != null">
        mongodbIndex,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="model != null">
        model,
      </if>
      <if test="ukey != null">
        ukey,
      </if>
      <if test="collindex != null">
        collIndex,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="redisindex != null">
        #{redisindex,jdbcType=INTEGER},
      </if>
      <if test="mongodbindex != null">
        #{mongodbindex,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        #{type,jdbcType=INTEGER},
      </if>
      <if test="model != null">
        #{model,jdbcType=INTEGER},
      </if>
      <if test="ukey != null">
        #{ukey,jdbcType=INTEGER},
      </if>
      <if test="collindex != null">
        #{collindex,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.RMConfigExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from rmconfig
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update rmconfig
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.redisindex != null">
        redisIndex = #{record.redisindex,jdbcType=INTEGER},
      </if>
      <if test="record.mongodbindex != null">
        mongodbIndex = #{record.mongodbindex,jdbcType=INTEGER},
      </if>
      <if test="record.type != null">
        type = #{record.type,jdbcType=INTEGER},
      </if>
      <if test="record.model != null">
        model = #{record.model,jdbcType=INTEGER},
      </if>
      <if test="record.ukey != null">
        ukey = #{record.ukey,jdbcType=INTEGER},
      </if>
      <if test="record.collindex != null">
        collIndex = #{record.collindex,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update rmconfig
    set id = #{record.id,jdbcType=VARCHAR},
      redisIndex = #{record.redisindex,jdbcType=INTEGER},
      mongodbIndex = #{record.mongodbindex,jdbcType=INTEGER},
      type = #{record.type,jdbcType=INTEGER},
      model = #{record.model,jdbcType=INTEGER},
      ukey = #{record.ukey,jdbcType=INTEGER},
      collIndex = #{record.collindex,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.RMConfig">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update rmconfig
    <set>
      <if test="redisindex != null">
        redisIndex = #{redisindex,jdbcType=INTEGER},
      </if>
      <if test="mongodbindex != null">
        mongodbIndex = #{mongodbindex,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=INTEGER},
      </if>
      <if test="model != null">
        model = #{model,jdbcType=INTEGER},
      </if>
      <if test="ukey != null">
        ukey = #{ukey,jdbcType=INTEGER},
      </if>
      <if test="collindex != null">
        collIndex = #{collindex,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.RMConfig">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update rmconfig
    set redisIndex = #{redisindex,jdbcType=INTEGER},
      mongodbIndex = #{mongodbindex,jdbcType=INTEGER},
      type = #{type,jdbcType=INTEGER},
      model = #{model,jdbcType=INTEGER},
      ukey = #{ukey,jdbcType=INTEGER},
      collIndex = #{collindex,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>