<?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.jsowell.pile.mapper.PersonalChargingRecordMapper">
  <resultMap id="BaseResultMap" type="com.jsowell.pile.domain.PersonalChargingRecord">
    <!--@mbg.generated-->
    <!--@Table personal_charging_record-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="transaction_code" jdbcType="VARCHAR" property="transactionCode" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="member_id" jdbcType="VARCHAR" property="memberId" />
    <result column="station_id" jdbcType="VARCHAR" property="stationId" />
    <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
    <result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
    <result column="connector_code" jdbcType="VARCHAR" property="connectorCode" />
    <result column="pile_connector_code" jdbcType="VARCHAR" property="pileConnectorCode" />
    <result column="logic_card" jdbcType="VARCHAR" property="logicCard" />
    <result column="vin_code" jdbcType="VARCHAR" property="vinCode" />
    <result column="start_mode" jdbcType="VARCHAR" property="startMode" />
    <result column="plate_number" jdbcType="VARCHAR" property="plateNumber" />
    <result column="charge_start_time" jdbcType="TIMESTAMP" property="chargeStartTime" />
    <result column="charge_end_time" jdbcType="TIMESTAMP" property="chargeEndTime" />
    <result column="start_type" jdbcType="VARCHAR" property="startType" />
    <result column="reservation_start_time" jdbcType="TIMESTAMP" property="reservationStartTime" />
    <result column="reservation_end_time" jdbcType="TIMESTAMP" property="reservationEndTime" />
    <result column="start_soc" jdbcType="VARCHAR" property="startSoc" />
    <result column="end_soc" jdbcType="VARCHAR" property="endSoc" />
    <result column="total_used_electricity" jdbcType="DECIMAL" property="totalUsedElectricity" />
    <result column="sharp_used_electricity" jdbcType="DECIMAL" property="sharpUsedElectricity" />
    <result column="peak_used_electricity" jdbcType="DECIMAL" property="peakUsedElectricity" />
    <result column="flat_used_electricity" jdbcType="DECIMAL" property="flatUsedElectricity" />
    <result column="valley_used_electricity" jdbcType="DECIMAL" property="valleyUsedElectricity" />
    <result column="reason" jdbcType="VARCHAR" property="reason" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="del_flag" jdbcType="CHAR" property="delFlag" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, transaction_code, `status`, member_id, station_id, merchant_id, pile_sn, connector_code, 
    pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time, 
    charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc, 
    end_soc, total_used_electricity, sharp_used_electricity, peak_used_electricity, flat_used_electricity, 
    valley_used_electricity, reason, create_by, create_time, update_by, update_time, 
    del_flag
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from personal_charging_record
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--@mbg.generated-->
    delete from personal_charging_record
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PersonalChargingRecord" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into personal_charging_record (transaction_code, `status`, member_id, 
      station_id, merchant_id, pile_sn, 
      connector_code, pile_connector_code, logic_card, 
      vin_code, start_mode, plate_number, 
      charge_start_time, charge_end_time, start_type, 
      reservation_start_time, reservation_end_time, 
      start_soc, end_soc, total_used_electricity, 
      sharp_used_electricity, peak_used_electricity, 
      flat_used_electricity, valley_used_electricity, 
      reason, create_by, create_time, 
      update_by, update_time, del_flag
      )
    values (#{transactionCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, 
      #{stationId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{pileSn,jdbcType=VARCHAR}, 
      #{connectorCode,jdbcType=VARCHAR}, #{pileConnectorCode,jdbcType=VARCHAR}, #{logicCard,jdbcType=VARCHAR}, 
      #{vinCode,jdbcType=VARCHAR}, #{startMode,jdbcType=VARCHAR}, #{plateNumber,jdbcType=VARCHAR}, 
      #{chargeStartTime,jdbcType=TIMESTAMP}, #{chargeEndTime,jdbcType=TIMESTAMP}, #{startType,jdbcType=VARCHAR}, 
      #{reservationStartTime,jdbcType=TIMESTAMP}, #{reservationEndTime,jdbcType=TIMESTAMP}, 
      #{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL}, 
      #{sharpUsedElectricity,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL}, 
      #{flatUsedElectricity,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL}, 
      #{reason,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR}
      )
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PersonalChargingRecord" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into personal_charging_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="transactionCode != null">
        transaction_code,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="memberId != null">
        member_id,
      </if>
      <if test="stationId != null">
        station_id,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="pileSn != null">
        pile_sn,
      </if>
      <if test="connectorCode != null">
        connector_code,
      </if>
      <if test="pileConnectorCode != null">
        pile_connector_code,
      </if>
      <if test="logicCard != null">
        logic_card,
      </if>
      <if test="vinCode != null">
        vin_code,
      </if>
      <if test="startMode != null">
        start_mode,
      </if>
      <if test="plateNumber != null">
        plate_number,
      </if>
      <if test="chargeStartTime != null">
        charge_start_time,
      </if>
      <if test="chargeEndTime != null">
        charge_end_time,
      </if>
      <if test="startType != null">
        start_type,
      </if>
      <if test="reservationStartTime != null">
        reservation_start_time,
      </if>
      <if test="reservationEndTime != null">
        reservation_end_time,
      </if>
      <if test="startSoc != null">
        start_soc,
      </if>
      <if test="endSoc != null">
        end_soc,
      </if>
      <if test="totalUsedElectricity != null">
        total_used_electricity,
      </if>
      <if test="sharpUsedElectricity != null">
        sharp_used_electricity,
      </if>
      <if test="peakUsedElectricity != null">
        peak_used_electricity,
      </if>
      <if test="flatUsedElectricity != null">
        flat_used_electricity,
      </if>
      <if test="valleyUsedElectricity != null">
        valley_used_electricity,
      </if>
      <if test="reason != null">
        reason,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="delFlag != null">
        del_flag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="transactionCode != null">
        #{transactionCode,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="stationId != null">
        #{stationId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="pileSn != null">
        #{pileSn,jdbcType=VARCHAR},
      </if>
      <if test="connectorCode != null">
        #{connectorCode,jdbcType=VARCHAR},
      </if>
      <if test="pileConnectorCode != null">
        #{pileConnectorCode,jdbcType=VARCHAR},
      </if>
      <if test="logicCard != null">
        #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="vinCode != null">
        #{vinCode,jdbcType=VARCHAR},
      </if>
      <if test="startMode != null">
        #{startMode,jdbcType=VARCHAR},
      </if>
      <if test="plateNumber != null">
        #{plateNumber,jdbcType=VARCHAR},
      </if>
      <if test="chargeStartTime != null">
        #{chargeStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="chargeEndTime != null">
        #{chargeEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startType != null">
        #{startType,jdbcType=VARCHAR},
      </if>
      <if test="reservationStartTime != null">
        #{reservationStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="reservationEndTime != null">
        #{reservationEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startSoc != null">
        #{startSoc,jdbcType=VARCHAR},
      </if>
      <if test="endSoc != null">
        #{endSoc,jdbcType=VARCHAR},
      </if>
      <if test="totalUsedElectricity != null">
        #{totalUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="sharpUsedElectricity != null">
        #{sharpUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="peakUsedElectricity != null">
        #{peakUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="flatUsedElectricity != null">
        #{flatUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="valleyUsedElectricity != null">
        #{valleyUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="delFlag != null">
        #{delFlag,jdbcType=CHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.PersonalChargingRecord">
    <!--@mbg.generated-->
    update personal_charging_record
    <set>
      <if test="transactionCode != null">
        transaction_code = #{transactionCode,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        member_id = #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="stationId != null">
        station_id = #{stationId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="pileSn != null">
        pile_sn = #{pileSn,jdbcType=VARCHAR},
      </if>
      <if test="connectorCode != null">
        connector_code = #{connectorCode,jdbcType=VARCHAR},
      </if>
      <if test="pileConnectorCode != null">
        pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
      </if>
      <if test="logicCard != null">
        logic_card = #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="vinCode != null">
        vin_code = #{vinCode,jdbcType=VARCHAR},
      </if>
      <if test="startMode != null">
        start_mode = #{startMode,jdbcType=VARCHAR},
      </if>
      <if test="plateNumber != null">
        plate_number = #{plateNumber,jdbcType=VARCHAR},
      </if>
      <if test="chargeStartTime != null">
        charge_start_time = #{chargeStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="chargeEndTime != null">
        charge_end_time = #{chargeEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startType != null">
        start_type = #{startType,jdbcType=VARCHAR},
      </if>
      <if test="reservationStartTime != null">
        reservation_start_time = #{reservationStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="reservationEndTime != null">
        reservation_end_time = #{reservationEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startSoc != null">
        start_soc = #{startSoc,jdbcType=VARCHAR},
      </if>
      <if test="endSoc != null">
        end_soc = #{endSoc,jdbcType=VARCHAR},
      </if>
      <if test="totalUsedElectricity != null">
        total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="sharpUsedElectricity != null">
        sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="peakUsedElectricity != null">
        peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="flatUsedElectricity != null">
        flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="valleyUsedElectricity != null">
        valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="delFlag != null">
        del_flag = #{delFlag,jdbcType=CHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.PersonalChargingRecord">
    <!--@mbg.generated-->
    update personal_charging_record
    set transaction_code = #{transactionCode,jdbcType=VARCHAR},
      `status` = #{status,jdbcType=VARCHAR},
      member_id = #{memberId,jdbcType=VARCHAR},
      station_id = #{stationId,jdbcType=VARCHAR},
      merchant_id = #{merchantId,jdbcType=VARCHAR},
      pile_sn = #{pileSn,jdbcType=VARCHAR},
      connector_code = #{connectorCode,jdbcType=VARCHAR},
      pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
      logic_card = #{logicCard,jdbcType=VARCHAR},
      vin_code = #{vinCode,jdbcType=VARCHAR},
      start_mode = #{startMode,jdbcType=VARCHAR},
      plate_number = #{plateNumber,jdbcType=VARCHAR},
      charge_start_time = #{chargeStartTime,jdbcType=TIMESTAMP},
      charge_end_time = #{chargeEndTime,jdbcType=TIMESTAMP},
      start_type = #{startType,jdbcType=VARCHAR},
      reservation_start_time = #{reservationStartTime,jdbcType=TIMESTAMP},
      reservation_end_time = #{reservationEndTime,jdbcType=TIMESTAMP},
      start_soc = #{startSoc,jdbcType=VARCHAR},
      end_soc = #{endSoc,jdbcType=VARCHAR},
      total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
      sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
      peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
      flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
      valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
      reason = #{reason,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      del_flag = #{delFlag,jdbcType=CHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateBatch" parameterType="java.util.List">
    <!--@mbg.generated-->
    update personal_charging_record
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="transaction_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.transactionCode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="`status` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="member_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="station_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.stationId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="merchant_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="pile_sn = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="connector_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.connectorCode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="pile_connector_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.pileConnectorCode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="logic_card = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.logicCard,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="vin_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.vinCode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="start_mode = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.startMode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="plate_number = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.plateNumber,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="charge_start_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.chargeStartTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="charge_end_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.chargeEndTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="start_type = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.startType,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="reservation_start_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.reservationStartTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="reservation_end_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.reservationEndTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="start_soc = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.startSoc,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="end_soc = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.endSoc,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="total_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.totalUsedElectricity,jdbcType=DECIMAL}
        </foreach>
      </trim>
      <trim prefix="sharp_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.sharpUsedElectricity,jdbcType=DECIMAL}
        </foreach>
      </trim>
      <trim prefix="peak_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.peakUsedElectricity,jdbcType=DECIMAL}
        </foreach>
      </trim>
      <trim prefix="flat_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.flatUsedElectricity,jdbcType=DECIMAL}
        </foreach>
      </trim>
      <trim prefix="valley_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL}
        </foreach>
      </trim>
      <trim prefix="reason = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.reason,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="create_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="update_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="del_flag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR}
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=INTEGER}
    </foreach>
  </update>
  <update id="updateBatchSelective" parameterType="java.util.List">
    <!--@mbg.generated-->
    update personal_charging_record
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="transaction_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.transactionCode != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.transactionCode,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="`status` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.status != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="member_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.memberId != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="station_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.stationId != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.stationId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="merchant_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.merchantId != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="pile_sn = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.pileSn != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="connector_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.connectorCode != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.connectorCode,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="pile_connector_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.pileConnectorCode != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.pileConnectorCode,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="logic_card = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.logicCard != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.logicCard,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="vin_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.vinCode != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.vinCode,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="start_mode = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.startMode != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.startMode,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="plate_number = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.plateNumber != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.plateNumber,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="charge_start_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.chargeStartTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.chargeStartTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="charge_end_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.chargeEndTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.chargeEndTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="start_type = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.startType != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.startType,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="reservation_start_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.reservationStartTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.reservationStartTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="reservation_end_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.reservationEndTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.reservationEndTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="start_soc = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.startSoc != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.startSoc,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="end_soc = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.endSoc != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.endSoc,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="total_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.totalUsedElectricity != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.totalUsedElectricity,jdbcType=DECIMAL}
          </if>
        </foreach>
      </trim>
      <trim prefix="sharp_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.sharpUsedElectricity != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.sharpUsedElectricity,jdbcType=DECIMAL}
          </if>
        </foreach>
      </trim>
      <trim prefix="peak_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.peakUsedElectricity != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.peakUsedElectricity,jdbcType=DECIMAL}
          </if>
        </foreach>
      </trim>
      <trim prefix="flat_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.flatUsedElectricity != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.flatUsedElectricity,jdbcType=DECIMAL}
          </if>
        </foreach>
      </trim>
      <trim prefix="valley_used_electricity = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.valleyUsedElectricity != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL}
          </if>
        </foreach>
      </trim>
      <trim prefix="reason = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.reason != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.reason,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="create_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.createBy != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.createTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="update_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.updateBy != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.updateTime != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="del_flag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.delFlag != null">
            when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR}
          </if>
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=INTEGER}
    </foreach>
  </update>
  <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into personal_charging_record
    (transaction_code, `status`, member_id, station_id, merchant_id, pile_sn, connector_code, 
      pile_connector_code, logic_card, vin_code, start_mode, plate_number, charge_start_time, 
      charge_end_time, start_type, reservation_start_time, reservation_end_time, start_soc, 
      end_soc, total_used_electricity, sharp_used_electricity, peak_used_electricity, 
      flat_used_electricity, valley_used_electricity, reason, create_by, create_time, 
      update_by, update_time, del_flag)
    values
    <foreach collection="list" item="item" separator=",">
      (#{item.transactionCode,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.memberId,jdbcType=VARCHAR}, 
        #{item.stationId,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.pileSn,jdbcType=VARCHAR}, 
        #{item.connectorCode,jdbcType=VARCHAR}, #{item.pileConnectorCode,jdbcType=VARCHAR}, 
        #{item.logicCard,jdbcType=VARCHAR}, #{item.vinCode,jdbcType=VARCHAR}, #{item.startMode,jdbcType=VARCHAR}, 
        #{item.plateNumber,jdbcType=VARCHAR}, #{item.chargeStartTime,jdbcType=TIMESTAMP}, 
        #{item.chargeEndTime,jdbcType=TIMESTAMP}, #{item.startType,jdbcType=VARCHAR}, #{item.reservationStartTime,jdbcType=TIMESTAMP}, 
        #{item.reservationEndTime,jdbcType=TIMESTAMP}, #{item.startSoc,jdbcType=VARCHAR}, 
        #{item.endSoc,jdbcType=VARCHAR}, #{item.totalUsedElectricity,jdbcType=DECIMAL}, 
        #{item.sharpUsedElectricity,jdbcType=DECIMAL}, #{item.peakUsedElectricity,jdbcType=DECIMAL}, 
        #{item.flatUsedElectricity,jdbcType=DECIMAL}, #{item.valleyUsedElectricity,jdbcType=DECIMAL}, 
        #{item.reason,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
        #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR}
        )
    </foreach>
  </insert>
  <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PersonalChargingRecord" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into personal_charging_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      transaction_code,
      `status`,
      member_id,
      station_id,
      merchant_id,
      pile_sn,
      connector_code,
      pile_connector_code,
      logic_card,
      vin_code,
      start_mode,
      plate_number,
      charge_start_time,
      charge_end_time,
      start_type,
      reservation_start_time,
      reservation_end_time,
      start_soc,
      end_soc,
      total_used_electricity,
      sharp_used_electricity,
      peak_used_electricity,
      flat_used_electricity,
      valley_used_electricity,
      reason,
      create_by,
      create_time,
      update_by,
      update_time,
      del_flag,
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      #{transactionCode,jdbcType=VARCHAR},
      #{status,jdbcType=VARCHAR},
      #{memberId,jdbcType=VARCHAR},
      #{stationId,jdbcType=VARCHAR},
      #{merchantId,jdbcType=VARCHAR},
      #{pileSn,jdbcType=VARCHAR},
      #{connectorCode,jdbcType=VARCHAR},
      #{pileConnectorCode,jdbcType=VARCHAR},
      #{logicCard,jdbcType=VARCHAR},
      #{vinCode,jdbcType=VARCHAR},
      #{startMode,jdbcType=VARCHAR},
      #{plateNumber,jdbcType=VARCHAR},
      #{chargeStartTime,jdbcType=TIMESTAMP},
      #{chargeEndTime,jdbcType=TIMESTAMP},
      #{startType,jdbcType=VARCHAR},
      #{reservationStartTime,jdbcType=TIMESTAMP},
      #{reservationEndTime,jdbcType=TIMESTAMP},
      #{startSoc,jdbcType=VARCHAR},
      #{endSoc,jdbcType=VARCHAR},
      #{totalUsedElectricity,jdbcType=DECIMAL},
      #{sharpUsedElectricity,jdbcType=DECIMAL},
      #{peakUsedElectricity,jdbcType=DECIMAL},
      #{flatUsedElectricity,jdbcType=DECIMAL},
      #{valleyUsedElectricity,jdbcType=DECIMAL},
      #{reason,jdbcType=VARCHAR},
      #{createBy,jdbcType=VARCHAR},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=VARCHAR},
      #{updateTime,jdbcType=TIMESTAMP},
      #{delFlag,jdbcType=CHAR},
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      transaction_code = #{transactionCode,jdbcType=VARCHAR},
      `status` = #{status,jdbcType=VARCHAR},
      member_id = #{memberId,jdbcType=VARCHAR},
      station_id = #{stationId,jdbcType=VARCHAR},
      merchant_id = #{merchantId,jdbcType=VARCHAR},
      pile_sn = #{pileSn,jdbcType=VARCHAR},
      connector_code = #{connectorCode,jdbcType=VARCHAR},
      pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
      logic_card = #{logicCard,jdbcType=VARCHAR},
      vin_code = #{vinCode,jdbcType=VARCHAR},
      start_mode = #{startMode,jdbcType=VARCHAR},
      plate_number = #{plateNumber,jdbcType=VARCHAR},
      charge_start_time = #{chargeStartTime,jdbcType=TIMESTAMP},
      charge_end_time = #{chargeEndTime,jdbcType=TIMESTAMP},
      start_type = #{startType,jdbcType=VARCHAR},
      reservation_start_time = #{reservationStartTime,jdbcType=TIMESTAMP},
      reservation_end_time = #{reservationEndTime,jdbcType=TIMESTAMP},
      start_soc = #{startSoc,jdbcType=VARCHAR},
      end_soc = #{endSoc,jdbcType=VARCHAR},
      total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
      sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
      peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
      flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
      valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
      reason = #{reason,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      del_flag = #{delFlag,jdbcType=CHAR},
    </trim>
  </insert>
  <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PersonalChargingRecord" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into personal_charging_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="transactionCode != null">
        transaction_code,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="memberId != null">
        member_id,
      </if>
      <if test="stationId != null">
        station_id,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="pileSn != null">
        pile_sn,
      </if>
      <if test="connectorCode != null">
        connector_code,
      </if>
      <if test="pileConnectorCode != null">
        pile_connector_code,
      </if>
      <if test="logicCard != null">
        logic_card,
      </if>
      <if test="vinCode != null">
        vin_code,
      </if>
      <if test="startMode != null">
        start_mode,
      </if>
      <if test="plateNumber != null">
        plate_number,
      </if>
      <if test="chargeStartTime != null">
        charge_start_time,
      </if>
      <if test="chargeEndTime != null">
        charge_end_time,
      </if>
      <if test="startType != null">
        start_type,
      </if>
      <if test="reservationStartTime != null">
        reservation_start_time,
      </if>
      <if test="reservationEndTime != null">
        reservation_end_time,
      </if>
      <if test="startSoc != null">
        start_soc,
      </if>
      <if test="endSoc != null">
        end_soc,
      </if>
      <if test="totalUsedElectricity != null">
        total_used_electricity,
      </if>
      <if test="sharpUsedElectricity != null">
        sharp_used_electricity,
      </if>
      <if test="peakUsedElectricity != null">
        peak_used_electricity,
      </if>
      <if test="flatUsedElectricity != null">
        flat_used_electricity,
      </if>
      <if test="valleyUsedElectricity != null">
        valley_used_electricity,
      </if>
      <if test="reason != null">
        reason,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="delFlag != null">
        del_flag,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="transactionCode != null">
        #{transactionCode,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="stationId != null">
        #{stationId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="pileSn != null">
        #{pileSn,jdbcType=VARCHAR},
      </if>
      <if test="connectorCode != null">
        #{connectorCode,jdbcType=VARCHAR},
      </if>
      <if test="pileConnectorCode != null">
        #{pileConnectorCode,jdbcType=VARCHAR},
      </if>
      <if test="logicCard != null">
        #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="vinCode != null">
        #{vinCode,jdbcType=VARCHAR},
      </if>
      <if test="startMode != null">
        #{startMode,jdbcType=VARCHAR},
      </if>
      <if test="plateNumber != null">
        #{plateNumber,jdbcType=VARCHAR},
      </if>
      <if test="chargeStartTime != null">
        #{chargeStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="chargeEndTime != null">
        #{chargeEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startType != null">
        #{startType,jdbcType=VARCHAR},
      </if>
      <if test="reservationStartTime != null">
        #{reservationStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="reservationEndTime != null">
        #{reservationEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startSoc != null">
        #{startSoc,jdbcType=VARCHAR},
      </if>
      <if test="endSoc != null">
        #{endSoc,jdbcType=VARCHAR},
      </if>
      <if test="totalUsedElectricity != null">
        #{totalUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="sharpUsedElectricity != null">
        #{sharpUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="peakUsedElectricity != null">
        #{peakUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="flatUsedElectricity != null">
        #{flatUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="valleyUsedElectricity != null">
        #{valleyUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="delFlag != null">
        #{delFlag,jdbcType=CHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="transactionCode != null">
        transaction_code = #{transactionCode,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        member_id = #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="stationId != null">
        station_id = #{stationId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="pileSn != null">
        pile_sn = #{pileSn,jdbcType=VARCHAR},
      </if>
      <if test="connectorCode != null">
        connector_code = #{connectorCode,jdbcType=VARCHAR},
      </if>
      <if test="pileConnectorCode != null">
        pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
      </if>
      <if test="logicCard != null">
        logic_card = #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="vinCode != null">
        vin_code = #{vinCode,jdbcType=VARCHAR},
      </if>
      <if test="startMode != null">
        start_mode = #{startMode,jdbcType=VARCHAR},
      </if>
      <if test="plateNumber != null">
        plate_number = #{plateNumber,jdbcType=VARCHAR},
      </if>
      <if test="chargeStartTime != null">
        charge_start_time = #{chargeStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="chargeEndTime != null">
        charge_end_time = #{chargeEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startType != null">
        start_type = #{startType,jdbcType=VARCHAR},
      </if>
      <if test="reservationStartTime != null">
        reservation_start_time = #{reservationStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="reservationEndTime != null">
        reservation_end_time = #{reservationEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="startSoc != null">
        start_soc = #{startSoc,jdbcType=VARCHAR},
      </if>
      <if test="endSoc != null">
        end_soc = #{endSoc,jdbcType=VARCHAR},
      </if>
      <if test="totalUsedElectricity != null">
        total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="sharpUsedElectricity != null">
        sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="peakUsedElectricity != null">
        peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="flatUsedElectricity != null">
        flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="valleyUsedElectricity != null">
        valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
      </if>
      <if test="reason != null">
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="delFlag != null">
        del_flag = #{delFlag,jdbcType=CHAR},
      </if>
    </trim>
  </insert>

  <select id="selectByTransactionCode" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from personal_charging_record
    where del_flag = '0'
    and transaction_code = #{transactionCode,jdbcType=VARCHAR}
    </select>
</mapper>