<?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.FinUserMapper" >
  <resultMap id="BaseResultMap" type="com.liquidnet.service.account.wallet.entity.FinUser" >
    <id column="FU0" property="finId" jdbcType="VARCHAR" />
    <result column="FU1" property="userExtId" jdbcType="VARCHAR" />
    <result column="FU2" property="userExtName" jdbcType="VARCHAR" />
    <result column="FU3" property="channelId" jdbcType="VARCHAR" />
    <result column="FU4" property="userStatus" jdbcType="VARCHAR" />
    <result column="FU5" property="userSeqNo" jdbcType="VARCHAR" />
    <result column="FU6" property="userFlag" jdbcType="VARCHAR" />
    <result column="FU7" property="createTime" jdbcType="TIMESTAMP" />
    <result column="FU8" property="updateTime" jdbcType="TIMESTAMP" />
  </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" >
    FU0, FU1, FU2, FU3, FU4, FU5, FU6, FU7, FU8
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.liquidnet.service.account.wallet.entity.FinUserExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from FIN_WL_N03
    <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_WL_N03
    where FU0 = #{finId,jdbcType=VARCHAR}
  </select>
  <insert id="insert" parameterType="com.liquidnet.service.account.wallet.entity.FinUser" >
    insert into FIN_WL_N03 (FU0, FU1, FU2, FU3, FU4, FU5, FU6, FU7, FU8
      )
    values (#{finId,jdbcType=VARCHAR}, #{userExtId,jdbcType=VARCHAR}, #{userExtName,jdbcType=VARCHAR}, 
      #{channelId,jdbcType=VARCHAR}, #{userStatus,jdbcType=VARCHAR}, #{userSeqNo,jdbcType=VARCHAR}, 
      #{userFlag,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.liquidnet.service.account.wallet.entity.FinUser" >
    insert into FIN_WL_N03
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="finId != null" >
        FU0,
      </if>
      <if test="userExtId != null" >
        FU1,
      </if>
      <if test="userExtName != null" >
        FU2,
      </if>
      <if test="channelId != null" >
        FU3,
      </if>
      <if test="userStatus != null" >
        FU4,
      </if>
      <if test="userSeqNo != null" >
        FU5,
      </if>
      <if test="userFlag != null" >
        FU6,
      </if>
      <if test="createTime != null" >
        FU7,
      </if>
      <if test="updateTime != null" >
        FU8,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="finId != null" >
        #{finId,jdbcType=VARCHAR},
      </if>
      <if test="userExtId != null" >
        #{userExtId,jdbcType=VARCHAR},
      </if>
      <if test="userExtName != null" >
        #{userExtName,jdbcType=VARCHAR},
      </if>
      <if test="channelId != null" >
        #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="userStatus != null" >
        #{userStatus,jdbcType=VARCHAR},
      </if>
      <if test="userSeqNo != null" >
        #{userSeqNo,jdbcType=VARCHAR},
      </if>
      <if test="userFlag != null" >
        #{userFlag,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.liquidnet.service.account.wallet.entity.FinUserExample" resultType="java.lang.Integer" >
    select count(*) from FIN_WL_N03
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update FIN_WL_N03
    <set >
      <if test="record.finId != null" >
        FU0 = #{record.finId,jdbcType=VARCHAR},
      </if>
      <if test="record.userExtId != null" >
        FU1 = #{record.userExtId,jdbcType=VARCHAR},
      </if>
      <if test="record.userExtName != null" >
        FU2 = #{record.userExtName,jdbcType=VARCHAR},
      </if>
      <if test="record.channelId != null" >
        FU3 = #{record.channelId,jdbcType=VARCHAR},
      </if>
      <if test="record.userStatus != null" >
        FU4 = #{record.userStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.userSeqNo != null" >
        FU5 = #{record.userSeqNo,jdbcType=VARCHAR},
      </if>
      <if test="record.userFlag != null" >
        FU6 = #{record.userFlag,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null" >
        FU7 = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null" >
        FU8 = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update FIN_WL_N03
    set FU0 = #{record.finId,jdbcType=VARCHAR},
      FU1 = #{record.userExtId,jdbcType=VARCHAR},
      FU2 = #{record.userExtName,jdbcType=VARCHAR},
      FU3 = #{record.channelId,jdbcType=VARCHAR},
      FU4 = #{record.userStatus,jdbcType=VARCHAR},
      FU5 = #{record.userSeqNo,jdbcType=VARCHAR},
      FU6 = #{record.userFlag,jdbcType=VARCHAR},
      FU7 = #{record.createTime,jdbcType=TIMESTAMP},
      FU8 = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.liquidnet.service.account.wallet.entity.FinUser" >
    update FIN_WL_N03
    <set >
      <if test="userExtId != null" >
        FU1 = #{userExtId,jdbcType=VARCHAR},
      </if>
      <if test="userExtName != null" >
        FU2 = #{userExtName,jdbcType=VARCHAR},
      </if>
      <if test="channelId != null" >
        FU3 = #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="userStatus != null" >
        FU4 = #{userStatus,jdbcType=VARCHAR},
      </if>
      <if test="userSeqNo != null" >
        FU5 = #{userSeqNo,jdbcType=VARCHAR},
      </if>
      <if test="userFlag != null" >
        FU6 = #{userFlag,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        FU7 = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        FU8 = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where FU0 = #{finId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.liquidnet.service.account.wallet.entity.FinUser" >
    update FIN_WL_N03
    set FU1 = #{userExtId,jdbcType=VARCHAR},
      FU2 = #{userExtName,jdbcType=VARCHAR},
      FU3 = #{channelId,jdbcType=VARCHAR},
      FU4 = #{userStatus,jdbcType=VARCHAR},
      FU5 = #{userSeqNo,jdbcType=VARCHAR},
      FU6 = #{userFlag,jdbcType=VARCHAR},
      FU7 = #{createTime,jdbcType=TIMESTAMP},
      FU8 = #{updateTime,jdbcType=TIMESTAMP}
    where FU0 = #{finId,jdbcType=VARCHAR}
  </update>
</mapper>