<?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.fuxi.ws.data.dao.WInterfaceconfigMapper" >
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WInterfaceconfig" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    <id column="SubSystem" property="subsystem" jdbcType="VARCHAR" />
    <id column="ParamID" property="paramid" jdbcType="SMALLINT" />
    <result column="ParamName" property="paramname" jdbcType="VARCHAR" />
    <result column="ParamValue" property="paramvalue" jdbcType="VARCHAR" />
    <result column="Memo" property="memo" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    <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="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    SubSystem, ParamID, ParamName, ParamValue, Memo
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WInterfaceconfigExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_InterfaceConfig
    <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="com.fuxi.ws.data.entity.WInterfaceconfigKey" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_InterfaceConfig
    where SubSystem = #{subsystem,jdbcType=VARCHAR}
      and ParamID = #{paramid,jdbcType=SMALLINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WInterfaceconfigKey" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    delete from W_InterfaceConfig
    where SubSystem = #{subsystem,jdbcType=VARCHAR}
      and ParamID = #{paramid,jdbcType=SMALLINT}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WInterfaceconfig" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    insert into W_InterfaceConfig (SubSystem, ParamID, ParamName, 
      ParamValue, Memo)
    values (#{subsystem,jdbcType=VARCHAR}, #{paramid,jdbcType=SMALLINT}, #{paramname,jdbcType=VARCHAR}, 
      #{paramvalue,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WInterfaceconfig" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    insert into W_InterfaceConfig
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="subsystem != null" >
        SubSystem,
      </if>
      <if test="paramid != null" >
        ParamID,
      </if>
      <if test="paramname != null" >
        ParamName,
      </if>
      <if test="paramvalue != null" >
        ParamValue,
      </if>
      <if test="memo != null" >
        Memo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="subsystem != null" >
        #{subsystem,jdbcType=VARCHAR},
      </if>
      <if test="paramid != null" >
        #{paramid,jdbcType=SMALLINT},
      </if>
      <if test="paramname != null" >
        #{paramname,jdbcType=VARCHAR},
      </if>
      <if test="paramvalue != null" >
        #{paramvalue,jdbcType=VARCHAR},
      </if>
      <if test="memo != null" >
        #{memo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WInterfaceconfigExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    select count(*) from W_InterfaceConfig
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WInterfaceconfig" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    update W_InterfaceConfig
    <set >
      <if test="paramname != null" >
        ParamName = #{paramname,jdbcType=VARCHAR},
      </if>
      <if test="paramvalue != null" >
        ParamValue = #{paramvalue,jdbcType=VARCHAR},
      </if>
      <if test="memo != null" >
        Memo = #{memo,jdbcType=VARCHAR},
      </if>
    </set>
    where SubSystem = #{subsystem,jdbcType=VARCHAR}
      and ParamID = #{paramid,jdbcType=SMALLINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WInterfaceconfig" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 09 14:53:17 CST 2015.
    -->
    update W_InterfaceConfig
    set ParamName = #{paramname,jdbcType=VARCHAR},
      ParamValue = #{paramvalue,jdbcType=VARCHAR},
      Memo = #{memo,jdbcType=VARCHAR}
    where SubSystem = #{subsystem,jdbcType=VARCHAR}
      and ParamID = #{paramid,jdbcType=SMALLINT}
  </update>
</mapper>