<?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.bailuntec.mapper.DcBaseFinanceWishInfractionMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="fine_amount" jdbcType="DECIMAL" property="fineAmount" />
    <result column="reason" jdbcType="VARCHAR" property="reason" />
    <result column="last_updated" jdbcType="TIMESTAMP" property="lastUpdated" />
    <result column="state" jdbcType="VARCHAR" property="state" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="link" jdbcType="VARCHAR" property="link" />
    <result column="infractions_id" jdbcType="VARCHAR" property="infractionsId" />
    <result column="account_id" jdbcType="INTEGER" property="accountId" />
    <result column="company_id" jdbcType="INTEGER" property="companyId" />
    <result column="gmt_create_time" jdbcType="TIMESTAMP" property="gmtCreateTime" />
    <result column="gmt_modify_time" jdbcType="TIMESTAMP" property="gmtModifyTime" />
    <result column="record_time" jdbcType="DATE" property="recordTime" />
    <result column="other_to_cny_exchange_rate" jdbcType="DECIMAL" property="otherToCnyExchangeRate" />
  </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, fine_amount, reason, last_updated, state, create_time, link, infractions_id, 
    account_id, company_id, gmt_create_time, gmt_modify_time, record_time, other_to_cny_exchange_rate
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishInfractionExample" 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 dc_base_finance_wish_infraction
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="rows != null">
      <if test="offset != null">
        limit ${offset}, ${rows}
      </if>
      <if test="offset == null">
        limit ${rows}
      </if>
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from dc_base_finance_wish_infraction
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_wish_infraction
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishInfractionExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_finance_wish_infraction
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish_infraction (id, fine_amount, reason, 
      last_updated, state, create_time, 
      link, infractions_id, account_id, 
      company_id, gmt_create_time, gmt_modify_time, 
      record_time, other_to_cny_exchange_rate)
    values (#{id,jdbcType=INTEGER}, #{fineAmount,jdbcType=DECIMAL}, #{reason,jdbcType=VARCHAR}, 
      #{lastUpdated,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{link,jdbcType=VARCHAR}, #{infractionsId,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER}, 
      #{companyId,jdbcType=INTEGER}, #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}, 
      #{recordTime,jdbcType=DATE}, #{otherToCnyExchangeRate,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_finance_wish_infraction
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="fineAmount != null">
        fine_amount,
      </if>
      <if test="reason != null">
        reason,
      </if>
      <if test="lastUpdated != null">
        last_updated,
      </if>
      <if test="state != null">
        state,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="link != null">
        link,
      </if>
      <if test="infractionsId != null">
        infractions_id,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="fineAmount != null">
        #{fineAmount,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdated != null">
        #{lastUpdated,jdbcType=TIMESTAMP},
      </if>
      <if test="state != null">
        #{state,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="link != null">
        #{link,jdbcType=VARCHAR},
      </if>
      <if test="infractionsId != null">
        #{infractionsId,jdbcType=VARCHAR},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        #{recordTime,jdbcType=DATE},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishInfractionExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_finance_wish_infraction
    <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 dc_base_finance_wish_infraction
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.fineAmount != null">
        fine_amount = #{record.fineAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.reason != null">
        reason = #{record.reason,jdbcType=VARCHAR},
      </if>
      <if test="record.lastUpdated != null">
        last_updated = #{record.lastUpdated,jdbcType=TIMESTAMP},
      </if>
      <if test="record.state != null">
        state = #{record.state,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.link != null">
        link = #{record.link,jdbcType=VARCHAR},
      </if>
      <if test="record.infractionsId != null">
        infractions_id = #{record.infractionsId,jdbcType=VARCHAR},
      </if>
      <if test="record.accountId != null">
        account_id = #{record.accountId,jdbcType=INTEGER},
      </if>
      <if test="record.companyId != null">
        company_id = #{record.companyId,jdbcType=INTEGER},
      </if>
      <if test="record.gmtCreateTime != null">
        gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModifyTime != null">
        gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.recordTime != null">
        record_time = #{record.recordTime,jdbcType=DATE},
      </if>
      <if test="record.otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL},
      </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 dc_base_finance_wish_infraction
    set id = #{record.id,jdbcType=INTEGER},
      fine_amount = #{record.fineAmount,jdbcType=DECIMAL},
      reason = #{record.reason,jdbcType=VARCHAR},
      last_updated = #{record.lastUpdated,jdbcType=TIMESTAMP},
      state = #{record.state,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      link = #{record.link,jdbcType=VARCHAR},
      infractions_id = #{record.infractionsId,jdbcType=VARCHAR},
      account_id = #{record.accountId,jdbcType=INTEGER},
      company_id = #{record.companyId,jdbcType=INTEGER},
      gmt_create_time = #{record.gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{record.gmtModifyTime,jdbcType=TIMESTAMP},
      record_time = #{record.recordTime,jdbcType=DATE},
      other_to_cny_exchange_rate = #{record.otherToCnyExchangeRate,jdbcType=DECIMAL}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_wish_infraction
    <set>
      <if test="fineAmount != null">
        fine_amount = #{fineAmount,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdated != null">
        last_updated = #{lastUpdated,jdbcType=TIMESTAMP},
      </if>
      <if test="state != null">
        state = #{state,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="link != null">
        link = #{link,jdbcType=VARCHAR},
      </if>
      <if test="infractionsId != null">
        infractions_id = #{infractionsId,jdbcType=VARCHAR},
      </if>
      <if test="accountId != null">
        account_id = #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        company_id = #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        record_time = #{recordTime,jdbcType=DATE},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_finance_wish_infraction
    set fine_amount = #{fineAmount,jdbcType=DECIMAL},
      reason = #{reason,jdbcType=VARCHAR},
      last_updated = #{lastUpdated,jdbcType=TIMESTAMP},
      state = #{state,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      link = #{link,jdbcType=VARCHAR},
      infractions_id = #{infractionsId,jdbcType=VARCHAR},
      account_id = #{accountId,jdbcType=INTEGER},
      company_id = #{companyId,jdbcType=INTEGER},
      gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      record_time = #{recordTime,jdbcType=DATE},
      other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_finance_wish_infraction
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="fineAmount != null">
        fine_amount,
      </if>
      <if test="reason != null">
        reason,
      </if>
      <if test="lastUpdated != null">
        last_updated,
      </if>
      <if test="state != null">
        state,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="link != null">
        link,
      </if>
      <if test="infractionsId != null">
        infractions_id,
      </if>
      <if test="accountId != null">
        account_id,
      </if>
      <if test="companyId != null">
        company_id,
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time,
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time,
      </if>
      <if test="recordTime != null">
        record_time,
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="fineAmount != null">
        #{fineAmount,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdated != null">
        #{lastUpdated,jdbcType=TIMESTAMP},
      </if>
      <if test="state != null">
        #{state,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="link != null">
        #{link,jdbcType=VARCHAR},
      </if>
      <if test="infractionsId != null">
        #{infractionsId,jdbcType=VARCHAR},
      </if>
      <if test="accountId != null">
        #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        #{recordTime,jdbcType=DATE},
      </if>
      <if test="otherToCnyExchangeRate != null">
        #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="fineAmount != null">
        fine_amount = #{fineAmount,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="lastUpdated != null">
        last_updated = #{lastUpdated,jdbcType=TIMESTAMP},
      </if>
      <if test="state != null">
        state = #{state,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="link != null">
        link = #{link,jdbcType=VARCHAR},
      </if>
      <if test="infractionsId != null">
        infractions_id = #{infractionsId,jdbcType=VARCHAR},
      </if>
      <if test="accountId != null">
        account_id = #{accountId,jdbcType=INTEGER},
      </if>
      <if test="companyId != null">
        company_id = #{companyId,jdbcType=INTEGER},
      </if>
      <if test="gmtCreateTime != null">
        gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModifyTime != null">
        gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recordTime != null">
        record_time = #{recordTime,jdbcType=DATE},
      </if>
      <if test="otherToCnyExchangeRate != null">
        other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseFinanceWishInfraction">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_finance_wish_infraction
    (id, fine_amount, reason, last_updated, state, create_time, link, infractions_id, 
      account_id, company_id, gmt_create_time, gmt_modify_time, record_time, other_to_cny_exchange_rate
      )
    values
    (#{id,jdbcType=INTEGER}, #{fineAmount,jdbcType=DECIMAL}, #{reason,jdbcType=VARCHAR}, 
      #{lastUpdated,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{link,jdbcType=VARCHAR}, #{infractionsId,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER}, 
      #{companyId,jdbcType=INTEGER}, #{gmtCreateTime,jdbcType=TIMESTAMP}, #{gmtModifyTime,jdbcType=TIMESTAMP}, 
      #{recordTime,jdbcType=DATE}, #{otherToCnyExchangeRate,jdbcType=DECIMAL})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    fine_amount = #{fineAmount,jdbcType=DECIMAL}, 
    reason = #{reason,jdbcType=VARCHAR}, 
    last_updated = #{lastUpdated,jdbcType=TIMESTAMP}, 
    state = #{state,jdbcType=VARCHAR}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    link = #{link,jdbcType=VARCHAR}, 
    infractions_id = #{infractionsId,jdbcType=VARCHAR}, 
    account_id = #{accountId,jdbcType=INTEGER}, 
    company_id = #{companyId,jdbcType=INTEGER}, 
    gmt_create_time = #{gmtCreateTime,jdbcType=TIMESTAMP}, 
    gmt_modify_time = #{gmtModifyTime,jdbcType=TIMESTAMP}, 
    record_time = #{recordTime,jdbcType=DATE}, 
    other_to_cny_exchange_rate = #{otherToCnyExchangeRate,jdbcType=DECIMAL}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseFinanceWishInfractionExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from dc_base_finance_wish_infraction
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>