This commit is contained in:
2026-02-15 16:02:06 +08:00
parent 6253fb6b2d
commit 71d0b0f609
30 changed files with 2844 additions and 799 deletions

View File

@ -14,27 +14,23 @@
<insert id="upsertHistoryJsonByMinute">
insert into ${tableName} (
site_id, statis_minute, data_json, create_by, create_time, update_by, update_time
site_id, statis_minute, data_json,
hot_soc, hot_total_active_power, hot_total_reactive_power, hot_day_charged_cap, hot_day_dis_charged_cap,
create_by, create_time, update_by, update_time
) values (
#{siteId}, #{statisMinute}, #{dataJson}, #{operName}, now(), #{operName}, now()
#{siteId}, #{statisMinute}, #{dataJson},
#{hotSoc}, #{hotTotalActivePower}, #{hotTotalReactivePower}, #{hotDayChargedCap}, #{hotDayDisChargedCap},
#{operName}, now(), #{operName}, now()
)
on duplicate key update
data_json = values(data_json),
hot_soc = values(hot_soc),
hot_total_active_power = values(hot_total_active_power),
hot_total_reactive_power = values(hot_total_reactive_power),
hot_day_charged_cap = values(hot_day_charged_cap),
hot_day_dis_charged_cap = values(hot_day_dis_charged_cap),
update_by = values(update_by),
update_time = now()
</insert>
<update id="updateHistoryHotColumns">
update ${tableName}
set hot_soc = #{hotSoc},
hot_total_active_power = #{hotTotalActivePower},
hot_total_reactive_power = #{hotTotalReactivePower},
hot_day_charged_cap = #{hotDayChargedCap},
hot_day_dis_charged_cap = #{hotDayDisChargedCap},
update_by = #{operName},
update_time = now()
where site_id = #{siteId}
and statis_minute = #{statisMinute}
</update>
</mapper>