Files
jsowell-charger-web/jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml
2024-01-06 15:26:35 +08:00

1293 lines
54 KiB
XML

<?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.OrderDetailMapper">
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.OrderDetail">
<!--@mbg.generated-->
<!--@Table order_detail-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="total_used_electricity" jdbcType="DECIMAL" property="totalUsedElectricity" />
<result column="total_order_amount" jdbcType="DECIMAL" property="totalOrderAmount" />
<result column="total_electricity_amount" jdbcType="DECIMAL" property="totalElectricityAmount" />
<result column="discount_electricity_amount" jdbcType="DECIMAL" property="discountElectricityAmount" />
<result column="total_service_amount" jdbcType="DECIMAL" property="totalServiceAmount" />
<result column="discount_service_amount" jdbcType="DECIMAL" property="discountServiceAmount" />
<result column="sharp_price" jdbcType="DECIMAL" property="sharpPrice" />
<result column="sharp_used_electricity" jdbcType="DECIMAL" property="sharpUsedElectricity" />
<result column="sharp_electricity_price" jdbcType="DECIMAL" property="sharpElectricityPrice" />
<result column="sharp_service_price" jdbcType="DECIMAL" property="sharpServicePrice" />
<result column="sharp_amount" jdbcType="DECIMAL" property="sharpAmount" />
<result column="peak_price" jdbcType="DECIMAL" property="peakPrice" />
<result column="peak_used_electricity" jdbcType="DECIMAL" property="peakUsedElectricity" />
<result column="peak_electricity_price" jdbcType="DECIMAL" property="peakElectricityPrice" />
<result column="peak_service_price" jdbcType="DECIMAL" property="peakServicePrice" />
<result column="peak_amount" jdbcType="DECIMAL" property="peakAmount" />
<result column="flat_price" jdbcType="DECIMAL" property="flatPrice" />
<result column="flat_used_electricity" jdbcType="DECIMAL" property="flatUsedElectricity" />
<result column="flat_electricity_price" jdbcType="DECIMAL" property="flatElectricityPrice" />
<result column="flat_service_price" jdbcType="DECIMAL" property="flatServicePrice" />
<result column="flat_amount" jdbcType="DECIMAL" property="flatAmount" />
<result column="valley_price" jdbcType="DECIMAL" property="valleyPrice" />
<result column="valley_used_electricity" jdbcType="DECIMAL" property="valleyUsedElectricity" />
<result column="valley_electricity_price" jdbcType="DECIMAL" property="valleyElectricityPrice" />
<result column="valley_service_price" jdbcType="DECIMAL" property="valleyServicePrice" />
<result column="valley_amount" jdbcType="DECIMAL" property="valleyAmount" />
<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, order_code, total_used_electricity, total_order_amount, total_electricity_amount,
discount_electricity_amount, total_service_amount, discount_service_amount, sharp_price,
sharp_used_electricity, sharp_electricity_price, sharp_service_price, sharp_amount,
peak_price, peak_used_electricity, peak_electricity_price, peak_service_price, peak_amount,
flat_price, flat_used_electricity, flat_electricity_price, flat_service_price, flat_amount,
valley_price, valley_used_electricity, valley_electricity_price, valley_service_price,
valley_amount, 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 order_detail
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from order_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_detail (order_code, total_used_electricity,
total_order_amount, total_electricity_amount,
discount_electricity_amount, total_service_amount,
discount_service_amount, sharp_price, sharp_used_electricity,
sharp_electricity_price, sharp_service_price,
sharp_amount, peak_price, peak_used_electricity,
peak_electricity_price, peak_service_price,
peak_amount, flat_price, flat_used_electricity,
flat_electricity_price, flat_service_price,
flat_amount, valley_price, valley_used_electricity,
valley_electricity_price, valley_service_price,
valley_amount, create_by, create_time,
update_by, update_time, del_flag
)
values (#{orderCode,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL},
#{totalOrderAmount,jdbcType=DECIMAL}, #{totalElectricityAmount,jdbcType=DECIMAL},
#{discountElectricityAmount,jdbcType=DECIMAL}, #{totalServiceAmount,jdbcType=DECIMAL},
#{discountServiceAmount,jdbcType=DECIMAL}, #{sharpPrice,jdbcType=DECIMAL}, #{sharpUsedElectricity,jdbcType=DECIMAL},
#{sharpElectricityPrice,jdbcType=DECIMAL}, #{sharpServicePrice,jdbcType=DECIMAL},
#{sharpAmount,jdbcType=DECIMAL}, #{peakPrice,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL},
#{peakElectricityPrice,jdbcType=DECIMAL}, #{peakServicePrice,jdbcType=DECIMAL},
#{peakAmount,jdbcType=DECIMAL}, #{flatPrice,jdbcType=DECIMAL}, #{flatUsedElectricity,jdbcType=DECIMAL},
#{flatElectricityPrice,jdbcType=DECIMAL}, #{flatServicePrice,jdbcType=DECIMAL},
#{flatAmount,jdbcType=DECIMAL}, #{valleyPrice,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL},
#{valleyElectricityPrice,jdbcType=DECIMAL}, #{valleyServicePrice,jdbcType=DECIMAL},
#{valleyAmount,jdbcType=DECIMAL}, #{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.OrderDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderCode != null">
order_code,
</if>
<if test="totalUsedElectricity != null">
total_used_electricity,
</if>
<if test="totalOrderAmount != null">
total_order_amount,
</if>
<if test="totalElectricityAmount != null">
total_electricity_amount,
</if>
<if test="discountElectricityAmount != null">
discount_electricity_amount,
</if>
<if test="totalServiceAmount != null">
total_service_amount,
</if>
<if test="discountServiceAmount != null">
discount_service_amount,
</if>
<if test="sharpPrice != null">
sharp_price,
</if>
<if test="sharpUsedElectricity != null">
sharp_used_electricity,
</if>
<if test="sharpElectricityPrice != null">
sharp_electricity_price,
</if>
<if test="sharpServicePrice != null">
sharp_service_price,
</if>
<if test="sharpAmount != null">
sharp_amount,
</if>
<if test="peakPrice != null">
peak_price,
</if>
<if test="peakUsedElectricity != null">
peak_used_electricity,
</if>
<if test="peakElectricityPrice != null">
peak_electricity_price,
</if>
<if test="peakServicePrice != null">
peak_service_price,
</if>
<if test="peakAmount != null">
peak_amount,
</if>
<if test="flatPrice != null">
flat_price,
</if>
<if test="flatUsedElectricity != null">
flat_used_electricity,
</if>
<if test="flatElectricityPrice != null">
flat_electricity_price,
</if>
<if test="flatServicePrice != null">
flat_service_price,
</if>
<if test="flatAmount != null">
flat_amount,
</if>
<if test="valleyPrice != null">
valley_price,
</if>
<if test="valleyUsedElectricity != null">
valley_used_electricity,
</if>
<if test="valleyElectricityPrice != null">
valley_electricity_price,
</if>
<if test="valleyServicePrice != null">
valley_service_price,
</if>
<if test="valleyAmount != null">
valley_amount,
</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="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="totalUsedElectricity != null">
#{totalUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="totalOrderAmount != null">
#{totalOrderAmount,jdbcType=DECIMAL},
</if>
<if test="totalElectricityAmount != null">
#{totalElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="discountElectricityAmount != null">
#{discountElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="totalServiceAmount != null">
#{totalServiceAmount,jdbcType=DECIMAL},
</if>
<if test="discountServiceAmount != null">
#{discountServiceAmount,jdbcType=DECIMAL},
</if>
<if test="sharpPrice != null">
#{sharpPrice,jdbcType=DECIMAL},
</if>
<if test="sharpUsedElectricity != null">
#{sharpUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="sharpElectricityPrice != null">
#{sharpElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="sharpServicePrice != null">
#{sharpServicePrice,jdbcType=DECIMAL},
</if>
<if test="sharpAmount != null">
#{sharpAmount,jdbcType=DECIMAL},
</if>
<if test="peakPrice != null">
#{peakPrice,jdbcType=DECIMAL},
</if>
<if test="peakUsedElectricity != null">
#{peakUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="peakElectricityPrice != null">
#{peakElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="peakServicePrice != null">
#{peakServicePrice,jdbcType=DECIMAL},
</if>
<if test="peakAmount != null">
#{peakAmount,jdbcType=DECIMAL},
</if>
<if test="flatPrice != null">
#{flatPrice,jdbcType=DECIMAL},
</if>
<if test="flatUsedElectricity != null">
#{flatUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="flatElectricityPrice != null">
#{flatElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="flatServicePrice != null">
#{flatServicePrice,jdbcType=DECIMAL},
</if>
<if test="flatAmount != null">
#{flatAmount,jdbcType=DECIMAL},
</if>
<if test="valleyPrice != null">
#{valleyPrice,jdbcType=DECIMAL},
</if>
<if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="valleyElectricityPrice != null">
#{valleyElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="valleyServicePrice != null">
#{valleyServicePrice,jdbcType=DECIMAL},
</if>
<if test="valleyAmount != null">
#{valleyAmount,jdbcType=DECIMAL},
</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.OrderDetail">
<!--@mbg.generated-->
update order_detail
<set>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="totalUsedElectricity != null">
total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="totalOrderAmount != null">
total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL},
</if>
<if test="totalElectricityAmount != null">
total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="discountElectricityAmount != null">
discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="totalServiceAmount != null">
total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL},
</if>
<if test="discountServiceAmount != null">
discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL},
</if>
<if test="sharpPrice != null">
sharp_price = #{sharpPrice,jdbcType=DECIMAL},
</if>
<if test="sharpUsedElectricity != null">
sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="sharpElectricityPrice != null">
sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="sharpServicePrice != null">
sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL},
</if>
<if test="sharpAmount != null">
sharp_amount = #{sharpAmount,jdbcType=DECIMAL},
</if>
<if test="peakPrice != null">
peak_price = #{peakPrice,jdbcType=DECIMAL},
</if>
<if test="peakUsedElectricity != null">
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="peakElectricityPrice != null">
peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="peakServicePrice != null">
peak_service_price = #{peakServicePrice,jdbcType=DECIMAL},
</if>
<if test="peakAmount != null">
peak_amount = #{peakAmount,jdbcType=DECIMAL},
</if>
<if test="flatPrice != null">
flat_price = #{flatPrice,jdbcType=DECIMAL},
</if>
<if test="flatUsedElectricity != null">
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="flatElectricityPrice != null">
flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="flatServicePrice != null">
flat_service_price = #{flatServicePrice,jdbcType=DECIMAL},
</if>
<if test="flatAmount != null">
flat_amount = #{flatAmount,jdbcType=DECIMAL},
</if>
<if test="valleyPrice != null">
valley_price = #{valleyPrice,jdbcType=DECIMAL},
</if>
<if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="valleyElectricityPrice != null">
valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="valleyServicePrice != null">
valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL},
</if>
<if test="valleyAmount != null">
valley_amount = #{valleyAmount,jdbcType=DECIMAL},
</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.OrderDetail">
<!--@mbg.generated-->
update order_detail
set order_code = #{orderCode,jdbcType=VARCHAR},
total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL},
total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL},
discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL},
total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL},
discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL},
sharp_price = #{sharpPrice,jdbcType=DECIMAL},
sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL},
sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL},
sharp_amount = #{sharpAmount,jdbcType=DECIMAL},
peak_price = #{peakPrice,jdbcType=DECIMAL},
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL},
peak_service_price = #{peakServicePrice,jdbcType=DECIMAL},
peak_amount = #{peakAmount,jdbcType=DECIMAL},
flat_price = #{flatPrice,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL},
flat_service_price = #{flatServicePrice,jdbcType=DECIMAL},
flat_amount = #{flatAmount,jdbcType=DECIMAL},
valley_price = #{valleyPrice,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL},
valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL},
valley_amount = #{valleyAmount,jdbcType=DECIMAL},
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 order_detail
<trim prefix="set" suffixOverrides=",">
<trim prefix="order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,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="total_order_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalOrderAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="total_electricity_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalElectricityAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="discount_electricity_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.discountElectricityAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="total_service_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalServiceAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="discount_service_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.discountServiceAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="sharp_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpPrice,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="sharp_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpElectricityPrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="sharp_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpServicePrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="sharp_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="peak_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakPrice,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="peak_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakElectricityPrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="peak_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakServicePrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="peak_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="flat_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatPrice,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="flat_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatElectricityPrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="flat_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatServicePrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="flat_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="valley_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyPrice,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="valley_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyElectricityPrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="valley_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyServicePrice,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="valley_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyAmount,jdbcType=DECIMAL}
</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 order_detail
<trim prefix="set" suffixOverrides=",">
<trim prefix="order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.orderCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,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="total_order_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.totalOrderAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalOrderAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="total_electricity_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.totalElectricityAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalElectricityAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="discount_electricity_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.discountElectricityAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.discountElectricityAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="total_service_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.totalServiceAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.totalServiceAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="discount_service_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.discountServiceAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.discountServiceAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="sharp_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.sharpPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpPrice,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="sharp_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.sharpElectricityPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpElectricityPrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="sharp_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.sharpServicePrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpServicePrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="sharp_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.sharpAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.sharpAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="peak_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.peakPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakPrice,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="peak_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.peakElectricityPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakElectricityPrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="peak_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.peakServicePrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakServicePrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="peak_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.peakAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.peakAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="flat_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.flatPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatPrice,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="flat_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.flatElectricityPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatElectricityPrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="flat_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.flatServicePrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatServicePrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="flat_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.flatAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.flatAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="valley_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.valleyPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyPrice,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="valley_electricity_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.valleyElectricityPrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyElectricityPrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="valley_service_price = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.valleyServicePrice != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyServicePrice,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="valley_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.valleyAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.valleyAmount,jdbcType=DECIMAL}
</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 order_detail
(order_code, total_used_electricity, total_order_amount, total_electricity_amount,
discount_electricity_amount, total_service_amount, discount_service_amount, sharp_price,
sharp_used_electricity, sharp_electricity_price, sharp_service_price, sharp_amount,
peak_price, peak_used_electricity, peak_electricity_price, peak_service_price,
peak_amount, flat_price, flat_used_electricity, flat_electricity_price, flat_service_price,
flat_amount, valley_price, valley_used_electricity, valley_electricity_price, valley_service_price,
valley_amount, create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.orderCode,jdbcType=VARCHAR}, #{item.totalUsedElectricity,jdbcType=DECIMAL},
#{item.totalOrderAmount,jdbcType=DECIMAL}, #{item.totalElectricityAmount,jdbcType=DECIMAL},
#{item.discountElectricityAmount,jdbcType=DECIMAL}, #{item.totalServiceAmount,jdbcType=DECIMAL},
#{item.discountServiceAmount,jdbcType=DECIMAL}, #{item.sharpPrice,jdbcType=DECIMAL},
#{item.sharpUsedElectricity,jdbcType=DECIMAL}, #{item.sharpElectricityPrice,jdbcType=DECIMAL},
#{item.sharpServicePrice,jdbcType=DECIMAL}, #{item.sharpAmount,jdbcType=DECIMAL},
#{item.peakPrice,jdbcType=DECIMAL}, #{item.peakUsedElectricity,jdbcType=DECIMAL},
#{item.peakElectricityPrice,jdbcType=DECIMAL}, #{item.peakServicePrice,jdbcType=DECIMAL},
#{item.peakAmount,jdbcType=DECIMAL}, #{item.flatPrice,jdbcType=DECIMAL}, #{item.flatUsedElectricity,jdbcType=DECIMAL},
#{item.flatElectricityPrice,jdbcType=DECIMAL}, #{item.flatServicePrice,jdbcType=DECIMAL},
#{item.flatAmount,jdbcType=DECIMAL}, #{item.valleyPrice,jdbcType=DECIMAL}, #{item.valleyUsedElectricity,jdbcType=DECIMAL},
#{item.valleyElectricityPrice,jdbcType=DECIMAL}, #{item.valleyServicePrice,jdbcType=DECIMAL},
#{item.valleyAmount,jdbcType=DECIMAL}, #{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.OrderDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
order_code,
total_used_electricity,
total_order_amount,
total_electricity_amount,
discount_electricity_amount,
total_service_amount,
discount_service_amount,
sharp_price,
sharp_used_electricity,
sharp_electricity_price,
sharp_service_price,
sharp_amount,
peak_price,
peak_used_electricity,
peak_electricity_price,
peak_service_price,
peak_amount,
flat_price,
flat_used_electricity,
flat_electricity_price,
flat_service_price,
flat_amount,
valley_price,
valley_used_electricity,
valley_electricity_price,
valley_service_price,
valley_amount,
create_by,
create_time,
update_by,
update_time,
del_flag,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{orderCode,jdbcType=VARCHAR},
#{totalUsedElectricity,jdbcType=DECIMAL},
#{totalOrderAmount,jdbcType=DECIMAL},
#{totalElectricityAmount,jdbcType=DECIMAL},
#{discountElectricityAmount,jdbcType=DECIMAL},
#{totalServiceAmount,jdbcType=DECIMAL},
#{discountServiceAmount,jdbcType=DECIMAL},
#{sharpPrice,jdbcType=DECIMAL},
#{sharpUsedElectricity,jdbcType=DECIMAL},
#{sharpElectricityPrice,jdbcType=DECIMAL},
#{sharpServicePrice,jdbcType=DECIMAL},
#{sharpAmount,jdbcType=DECIMAL},
#{peakPrice,jdbcType=DECIMAL},
#{peakUsedElectricity,jdbcType=DECIMAL},
#{peakElectricityPrice,jdbcType=DECIMAL},
#{peakServicePrice,jdbcType=DECIMAL},
#{peakAmount,jdbcType=DECIMAL},
#{flatPrice,jdbcType=DECIMAL},
#{flatUsedElectricity,jdbcType=DECIMAL},
#{flatElectricityPrice,jdbcType=DECIMAL},
#{flatServicePrice,jdbcType=DECIMAL},
#{flatAmount,jdbcType=DECIMAL},
#{valleyPrice,jdbcType=DECIMAL},
#{valleyUsedElectricity,jdbcType=DECIMAL},
#{valleyElectricityPrice,jdbcType=DECIMAL},
#{valleyServicePrice,jdbcType=DECIMAL},
#{valleyAmount,jdbcType=DECIMAL},
#{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>
order_code = #{orderCode,jdbcType=VARCHAR},
total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL},
total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL},
discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL},
total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL},
discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL},
sharp_price = #{sharpPrice,jdbcType=DECIMAL},
sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL},
sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL},
sharp_amount = #{sharpAmount,jdbcType=DECIMAL},
peak_price = #{peakPrice,jdbcType=DECIMAL},
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL},
peak_service_price = #{peakServicePrice,jdbcType=DECIMAL},
peak_amount = #{peakAmount,jdbcType=DECIMAL},
flat_price = #{flatPrice,jdbcType=DECIMAL},
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL},
flat_service_price = #{flatServicePrice,jdbcType=DECIMAL},
flat_amount = #{flatAmount,jdbcType=DECIMAL},
valley_price = #{valleyPrice,jdbcType=DECIMAL},
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL},
valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL},
valley_amount = #{valleyAmount,jdbcType=DECIMAL},
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.OrderDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderCode != null">
order_code,
</if>
<if test="totalUsedElectricity != null">
total_used_electricity,
</if>
<if test="totalOrderAmount != null">
total_order_amount,
</if>
<if test="totalElectricityAmount != null">
total_electricity_amount,
</if>
<if test="discountElectricityAmount != null">
discount_electricity_amount,
</if>
<if test="totalServiceAmount != null">
total_service_amount,
</if>
<if test="discountServiceAmount != null">
discount_service_amount,
</if>
<if test="sharpPrice != null">
sharp_price,
</if>
<if test="sharpUsedElectricity != null">
sharp_used_electricity,
</if>
<if test="sharpElectricityPrice != null">
sharp_electricity_price,
</if>
<if test="sharpServicePrice != null">
sharp_service_price,
</if>
<if test="sharpAmount != null">
sharp_amount,
</if>
<if test="peakPrice != null">
peak_price,
</if>
<if test="peakUsedElectricity != null">
peak_used_electricity,
</if>
<if test="peakElectricityPrice != null">
peak_electricity_price,
</if>
<if test="peakServicePrice != null">
peak_service_price,
</if>
<if test="peakAmount != null">
peak_amount,
</if>
<if test="flatPrice != null">
flat_price,
</if>
<if test="flatUsedElectricity != null">
flat_used_electricity,
</if>
<if test="flatElectricityPrice != null">
flat_electricity_price,
</if>
<if test="flatServicePrice != null">
flat_service_price,
</if>
<if test="flatAmount != null">
flat_amount,
</if>
<if test="valleyPrice != null">
valley_price,
</if>
<if test="valleyUsedElectricity != null">
valley_used_electricity,
</if>
<if test="valleyElectricityPrice != null">
valley_electricity_price,
</if>
<if test="valleyServicePrice != null">
valley_service_price,
</if>
<if test="valleyAmount != null">
valley_amount,
</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="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="totalUsedElectricity != null">
#{totalUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="totalOrderAmount != null">
#{totalOrderAmount,jdbcType=DECIMAL},
</if>
<if test="totalElectricityAmount != null">
#{totalElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="discountElectricityAmount != null">
#{discountElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="totalServiceAmount != null">
#{totalServiceAmount,jdbcType=DECIMAL},
</if>
<if test="discountServiceAmount != null">
#{discountServiceAmount,jdbcType=DECIMAL},
</if>
<if test="sharpPrice != null">
#{sharpPrice,jdbcType=DECIMAL},
</if>
<if test="sharpUsedElectricity != null">
#{sharpUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="sharpElectricityPrice != null">
#{sharpElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="sharpServicePrice != null">
#{sharpServicePrice,jdbcType=DECIMAL},
</if>
<if test="sharpAmount != null">
#{sharpAmount,jdbcType=DECIMAL},
</if>
<if test="peakPrice != null">
#{peakPrice,jdbcType=DECIMAL},
</if>
<if test="peakUsedElectricity != null">
#{peakUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="peakElectricityPrice != null">
#{peakElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="peakServicePrice != null">
#{peakServicePrice,jdbcType=DECIMAL},
</if>
<if test="peakAmount != null">
#{peakAmount,jdbcType=DECIMAL},
</if>
<if test="flatPrice != null">
#{flatPrice,jdbcType=DECIMAL},
</if>
<if test="flatUsedElectricity != null">
#{flatUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="flatElectricityPrice != null">
#{flatElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="flatServicePrice != null">
#{flatServicePrice,jdbcType=DECIMAL},
</if>
<if test="flatAmount != null">
#{flatAmount,jdbcType=DECIMAL},
</if>
<if test="valleyPrice != null">
#{valleyPrice,jdbcType=DECIMAL},
</if>
<if test="valleyUsedElectricity != null">
#{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="valleyElectricityPrice != null">
#{valleyElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="valleyServicePrice != null">
#{valleyServicePrice,jdbcType=DECIMAL},
</if>
<if test="valleyAmount != null">
#{valleyAmount,jdbcType=DECIMAL},
</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="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="totalUsedElectricity != null">
total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="totalOrderAmount != null">
total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL},
</if>
<if test="totalElectricityAmount != null">
total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="discountElectricityAmount != null">
discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL},
</if>
<if test="totalServiceAmount != null">
total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL},
</if>
<if test="discountServiceAmount != null">
discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL},
</if>
<if test="sharpPrice != null">
sharp_price = #{sharpPrice,jdbcType=DECIMAL},
</if>
<if test="sharpUsedElectricity != null">
sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="sharpElectricityPrice != null">
sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="sharpServicePrice != null">
sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL},
</if>
<if test="sharpAmount != null">
sharp_amount = #{sharpAmount,jdbcType=DECIMAL},
</if>
<if test="peakPrice != null">
peak_price = #{peakPrice,jdbcType=DECIMAL},
</if>
<if test="peakUsedElectricity != null">
peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="peakElectricityPrice != null">
peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="peakServicePrice != null">
peak_service_price = #{peakServicePrice,jdbcType=DECIMAL},
</if>
<if test="peakAmount != null">
peak_amount = #{peakAmount,jdbcType=DECIMAL},
</if>
<if test="flatPrice != null">
flat_price = #{flatPrice,jdbcType=DECIMAL},
</if>
<if test="flatUsedElectricity != null">
flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="flatElectricityPrice != null">
flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="flatServicePrice != null">
flat_service_price = #{flatServicePrice,jdbcType=DECIMAL},
</if>
<if test="flatAmount != null">
flat_amount = #{flatAmount,jdbcType=DECIMAL},
</if>
<if test="valleyPrice != null">
valley_price = #{valleyPrice,jdbcType=DECIMAL},
</if>
<if test="valleyUsedElectricity != null">
valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL},
</if>
<if test="valleyElectricityPrice != null">
valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL},
</if>
<if test="valleyServicePrice != null">
valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL},
</if>
<if test="valleyAmount != null">
valley_amount = #{valleyAmount,jdbcType=DECIMAL},
</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>
</mapper>