<?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.FinBizTradeMapper">
  <resultMap id="BaseResultMap" type="com.liquidnet.service.account.wallet.entity.FinBizTrade">
    <id column="FBT10" jdbcType="VARCHAR" property="tradeNo" />
    <result column="FBT11" jdbcType="VARCHAR" property="channelId" />
    <result column="FBT12" jdbcType="VARCHAR" property="bizType" />
    <result column="FBT13" jdbcType="VARCHAR" property="tradeType" />
    <result column="FBT14" jdbcType="INTEGER" property="tradeStatus" />
    <result column="FBT15" jdbcType="TIMESTAMP" property="createTime" />
    <result column="FBT16" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="FBT17" jdbcType="VARCHAR" property="additional" />
    <result column="FBT18" jdbcType="VARCHAR" property="remark" />
  </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">
    FBT10, FBT11, FBT12, FBT13, FBT14, FBT15, FBT16,
    FBT17, FBT18
  </sql>
  <select id="selectByExample" parameterType="com.liquidnet.service.account.wallet.entity.FinBizTradeExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from FIN_WL_N10
    <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">
    select
    <include refid="Base_Column_List" />
    from FIN_WL_N10
    where FBT10 = #{tradeNo,jdbcType=VARCHAR}
  </select>
  <insert id="insert" parameterType="com.liquidnet.service.account.wallet.entity.FinBizTrade">
    insert into FIN_WL_N10 (FBT10, FBT11, FBT12,
      FBT13, FBT14, FBT15,
      FBT16, FBT17, FBT18
      )
    values (#{tradeNo,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, #{bizType,jdbcType=VARCHAR},
      #{tradeType,jdbcType=VARCHAR}, #{tradeStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
      #{updateTime,jdbcType=TIMESTAMP}, #{additional,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.liquidnet.service.account.wallet.entity.FinBizTrade">
    insert into FIN_WL_N10
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="tradeNo != null">
        FBT10,
      </if>
      <if test="channelId != null">
        FBT11,
      </if>
      <if test="bizType != null">
        FBT12,
      </if>
      <if test="tradeType != null">
        FBT13,
      </if>
      <if test="tradeStatus != null">
        FBT14,
      </if>
      <if test="createTime != null">
        FBT15,
      </if>
      <if test="updateTime != null">
        FBT16,
      </if>
      <if test="additional != null">
        FBT17,
      </if>
      <if test="remark != null">
        FBT18,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="tradeNo != null">
        #{tradeNo,jdbcType=VARCHAR},
      </if>
      <if test="channelId != null">
        #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        #{tradeType,jdbcType=VARCHAR},
      </if>
      <if test="tradeStatus != null">
        #{tradeStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="additional != null">
        #{additional,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.liquidnet.service.account.wallet.entity.FinBizTradeExample" resultType="java.lang.Integer">
    select count(*) from FIN_WL_N10
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update FIN_WL_N10
    <set>
      <if test="record.tradeNo != null">
        FBT10 = #{record.tradeNo,jdbcType=VARCHAR},
      </if>
      <if test="record.channelId != null">
        FBT11 = #{record.channelId,jdbcType=VARCHAR},
      </if>
      <if test="record.bizType != null">
        FBT12 = #{record.bizType,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeType != null">
        FBT13 = #{record.tradeType,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeStatus != null">
        FBT14 = #{record.tradeStatus,jdbcType=INTEGER},
      </if>
      <if test="record.createTime != null">
        FBT15 = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        FBT16 = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.additional != null">
        FBT17 = #{record.additional,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        FBT18 = #{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_WL_N10
    set FBT10 = #{record.tradeNo,jdbcType=VARCHAR},
      FBT11 = #{record.channelId,jdbcType=VARCHAR},
      FBT12 = #{record.bizType,jdbcType=VARCHAR},
      FBT13 = #{record.tradeType,jdbcType=VARCHAR},
      FBT14 = #{record.tradeStatus,jdbcType=INTEGER},
      FBT15 = #{record.createTime,jdbcType=TIMESTAMP},
      FBT16 = #{record.updateTime,jdbcType=TIMESTAMP},
      FBT17 = #{record.additional,jdbcType=VARCHAR},
      FBT18 = #{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.FinBizTrade">
    update FIN_WL_N10
    <set>
      <if test="channelId != null">
        FBT11 = #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        FBT12 = #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="tradeType != null">
        FBT13 = #{tradeType,jdbcType=VARCHAR},
      </if>
      <if test="tradeStatus != null">
        FBT14 = #{tradeStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        FBT15 = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        FBT16 = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="additional != null">
        FBT17 = #{additional,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        FBT18 = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where FBT10 = #{tradeNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.liquidnet.service.account.wallet.entity.FinBizTrade">
    update FIN_WL_N10
    set FBT11 = #{channelId,jdbcType=VARCHAR},
      FBT12 = #{bizType,jdbcType=VARCHAR},
      FBT13 = #{tradeType,jdbcType=VARCHAR},
      FBT14 = #{tradeStatus,jdbcType=INTEGER},
      FBT15 = #{createTime,jdbcType=TIMESTAMP},
      FBT16 = #{updateTime,jdbcType=TIMESTAMP},
      FBT17 = #{additional,jdbcType=VARCHAR},
      FBT18 = #{remark,jdbcType=VARCHAR}
    where FBT10 = #{tradeNo,jdbcType=VARCHAR}
  </update>
</mapper>
