select
from order_basic_info
id,
order_code,
transaction_code,
order_status,
member_id,
station_id,
pile_sn,
connector_code,
pile_connector_code,
logic_card,
start_mode,
pay_mode,
pay_status,
pay_amount,
pay_time,
order_amount,
charge_start_time,
charge_end_time,
start_type,
appointment_time,
start_soc,
end_soc,
reason,
settlement_time,
refund_amount,
create_by,
create_time,
update_by,
update_time,
del_flag
id,
order_code,
total_used_electricity,
total_order_amount,
total_electricity_amount,
total_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
insert into order_basic_info
order_code,
transaction_code,
order_status,
member_id,
station_id,
pile_sn,
connector_code,
pile_connector_code,
logic_card,
start_mode,
pay_mode,
pay_status,
pay_amount,
pay_time,
order_amount,
charge_start_time,
charge_end_time,
start_type,
appointment_time,
start_soc,
end_soc,
reason,
settlement_time,
refund_amount,
create_by,
create_time,
update_by,
update_time,
del_flag,
#{orderCode},
#{transactionCode},
#{orderStatus},
#{memberId},
#{stationId},
#{pileSn,jdbcType=VARCHAR},
#{connectorCode},
#{pileConnectorCode},
#{logicCard},
#{startMode},
#{payMode},
#{payStatus},
#{payAmount},
#{payTime},
#{orderAmount},
#{chargeStartTime},
#{chargeEndTime},
#{startType},
#{appointmentTime},
#{startSOC},
#{endSOC},
#{reason},
#{settlementTime},
#{refundAmount},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{delFlag},
update order_basic_info
order_code = #{orderCode},
order_status = #{orderStatus},
member_id = #{memberId},
station_id = #{stationId},
pile_sn = #{pileSn},
connector_code = #{connectorCode},
pile_connector_code = #{pileConnectorCode},
logic_card = #{logicCard},
start_mode = #{startMode},
pay_mode = #{payMode},
pay_status = #{payStatus},
pay_amount = #{payAmount},
pay_time = #{payTime},
order_amount = #{orderAmount},
charge_start_time = #{chargeStartTime},
charge_end_time = #{chargeEndTime},
start_type = #{startType},
appointment_time = #{appointmentTime},
start_soc = #{startSOC},
end_soc = #{endSOC},
reason = #{reason},
settlement_time = #{settlementTime},
refund_amount = #{refundAmount},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
del_flag = #{delFlag},
where id = #{id}
delete
from order_basic_info where id in
#{id}
delete
from order_detail where order_code in
#{orderCode}
delete
from order_detail
where order_code = #{orderCode}
insert into order_detail(id, order_code, total_used_electricity, total_order_amount, total_electricity_amount,total_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,update_by, create_time)
values
(#{item.id}, #{item.orderCode}, #{item.totalUsedElectricity}, #{item.totalOrderAmount}, #{item.totalElectricityAmount}, #{item.totalServiceAmount},
#{item.sharpPrice}, #{item.sharpUsedElectricity}, #{item.sharpElectricityPrice}, #{item.sharpServicePrice}, #{item.sharpAmount},
#{item.peakPrice}, #{item.peakUsedElectricity}, #{item.peakElectricityPrice}, #{item.peakServicePrice}, #{item.peakAmount},
#{item.flatPrice}, #{item.flatUsedElectricity}, #{item.flatElectricityPrice}, #{item.flatServicePrice}, #{item.flatAmount},
#{item.valleyPrice}, #{item.valleyUsedElectricity}, #{item.valleyElectricityPrice}, #{item.valleyServicePrice}, #{item.valleyAmount},
#{item.createBy}, #{item.updateBy}, #{item.createTime,jdbcType=TIMESTAMP})
update order_detail
order_code = #{orderCode},
total_used_electricity = #{totalUsedElectricity},
total_order_amount = #{totalOrderAmount},
total_electricity_amount = #{totalElectricityAmount},
total_service_amount = #{totalServiceAmount},
sharp_price = #{sharpPrice},
sharp_used_electricity = #{sharpUsedElectricity},
sharp_electricity_price = #{sharpElectricityPrice},
sharp_service_price = #{sharpServicePrice},
sharp_amount = #{sharpAmount},
peak_price = #{peakPrice},
peak_used_electricity = #{peakUsedElectricity},
peak_electricity_price = #{peakElectricityPrice},
peak_service_price = #{peakServicePrice},
peak_amount = #{peakAmount},
flat_price = #{flatPrice},
flat_used_electricity = #{flatUsedElectricity},
flat_electricity_price = #{flatElectricityPrice},
flat_service_price = #{flatServicePrice},
flat_amount = #{flatAmount},
valley_price = #{valleyPrice},
valley_used_electricity = #{valleyUsedElectricity},
valley_electricity_price = #{valleyElectricityPrice},
valley_service_price = #{valleyServicePrice},
valley_amount = #{valleyAmount},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
del_flag = #{delFlag},
where id = #{id}
update order_basic_info set order_status = #{orderStatus,jdbcType=VARCHAR}
where del_flag = '0'
and order_code = #{orderCode,jdbcType=VARCHAR}
update order_basic_info set order_status = #{orderStatus,jdbcType=VARCHAR}
where del_flag = '0'
and id in
#{orderId,jdbcType=VARCHAR}