<?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.liquidnet.service.account.wallet.mapper.FinDictMapper" >
  <resultMap id="BaseResultMap" type="com.liquidnet.service.account.wallet.entity.FinDict" >
    <id column="FD0" property="dictId" jdbcType="VARCHAR" />
    <result column="FD1" property="dictCode" jdbcType="VARCHAR" />
    <result column="FD2" property="dictName" jdbcType="VARCHAR" />
    <result column="FD3" property="status" jdbcType="DECIMAL" />
    <result column="FD4" property="remark" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <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="Update_By_Example_Where_Clause" >
    <where >
      <foreach collection="example.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" >
    FD0, FD1, FD2, FD3, FD4
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.liquidnet.service.account.wallet.entity.FinDictExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from FIN_N01
    <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="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from FIN_N01
    where FD0 = #{dictId,jdbcType=VARCHAR}
  </select>
  <insert id="insert" parameterType="com.liquidnet.service.account.wallet.entity.FinDict" >
    insert into FIN_N01 (FD0, FD1, FD2,
      FD3, FD4)
    values (#{dictId,jdbcType=VARCHAR}, #{dictCode,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, 
      #{status,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.liquidnet.service.account.wallet.entity.FinDict" >
    insert into FIN_N01
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="dictId != null" >
        FD0,
      </if>
      <if test="dictCode != null" >
        FD1,
      </if>
      <if test="dictName != null" >
        FD2,
      </if>
      <if test="status != null" >
        FD3,
      </if>
      <if test="remark != null" >
        FD4,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="dictId != null" >
        #{dictId,jdbcType=VARCHAR},
      </if>
      <if test="dictCode != null" >
        #{dictCode,jdbcType=VARCHAR},
      </if>
      <if test="dictName != null" >
        #{dictName,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=DECIMAL},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.liquidnet.service.account.wallet.entity.FinDictExample" resultType="java.lang.Integer" >
    select count(*) from FIN_N01
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update FIN_N01
    <set >
      <if test="record.dictId != null" >
        FD0 = #{record.dictId,jdbcType=VARCHAR},
      </if>
      <if test="record.dictCode != null" >
        FD1 = #{record.dictCode,jdbcType=VARCHAR},
      </if>
      <if test="record.dictName != null" >
        FD2 = #{record.dictName,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null" >
        FD3 = #{record.status,jdbcType=DECIMAL},
      </if>
      <if test="record.remark != null" >
        FD4 = #{record.remark,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update FIN_N01
    set FD0 = #{record.dictId,jdbcType=VARCHAR},
      FD1 = #{record.dictCode,jdbcType=VARCHAR},
      FD2 = #{record.dictName,jdbcType=VARCHAR},
      FD3 = #{record.status,jdbcType=DECIMAL},
      FD4 = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.liquidnet.service.account.wallet.entity.FinDict" >
    update FIN_N01
    <set >
      <if test="dictCode != null" >
        FD1 = #{dictCode,jdbcType=VARCHAR},
      </if>
      <if test="dictName != null" >
        FD2 = #{dictName,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        FD3 = #{status,jdbcType=DECIMAL},
      </if>
      <if test="remark != null" >
        FD4 = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where FD0 = #{dictId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.liquidnet.service.account.wallet.entity.FinDict" >
    update FIN_N01
    set FD1 = #{dictCode,jdbcType=VARCHAR},
      FD2 = #{dictName,jdbcType=VARCHAR},
      FD3 = #{status,jdbcType=DECIMAL},
      FD4 = #{remark,jdbcType=VARCHAR}
    where FD0 = #{dictId,jdbcType=VARCHAR}
  </update>
</mapper>