临时修改
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
<?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.xzzn.ems.mapper.EmsSiteMonitorDataMapper">
|
||||
|
||||
<select id="selectHistoryJsonByMinute" resultType="java.lang.String">
|
||||
select data_json
|
||||
from ${tableName}
|
||||
where site_id = #{siteId}
|
||||
and statis_minute = #{statisMinute}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="upsertHistoryJsonByMinute">
|
||||
insert into ${tableName} (
|
||||
site_id, statis_minute, data_json, create_by, create_time, update_by, update_time
|
||||
) values (
|
||||
#{siteId}, #{statisMinute}, #{dataJson}, #{operName}, now(), #{operName}, now()
|
||||
)
|
||||
on duplicate key update
|
||||
data_json = values(data_json),
|
||||
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>
|
||||
Reference in New Issue
Block a user