济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

77 lines
2.6 KiB

<?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.zc.business.mapper.DcGantryMetricsStatisticsDataMapper">
<!-- 插入或更新门架指标数据 -->
<insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcGantryMetricsStatisticsData">
INSERT INTO
dc_gantry_metrics_statistics_data
(
id,
gantry_code,
statistical_date,
period_type,
crowding_rate,
traffic_composition_rate,
saturation_rate,
create_time
)
VALUES
(
#{id},
#{gantryCode},
#{statisticalDate},
#{periodType},
#{crowdingRate},
#{trafficCompositionRate},
#{saturationRate},
NOW())
ON DUPLICATE KEY UPDATE
gantry_code = VALUES(gantry_code),
statistical_date = VALUES(statistical_date),
period_type = VALUES(period_type),
crowding_rate = VALUES(crowding_rate),
traffic_composition_rate = VALUES(traffic_composition_rate),
saturation_rate = VALUES(saturation_rate),
update_time = NOW()
</insert>
<insert id="insertOrUpdateBatch" parameterType="list">
INSERT INTO
dc_gantry_metrics_statistics_data
(
id,
gantry_code,
statistical_date,
period_type,
crowding_rate,
traffic_composition_rate,
saturation_rate,
create_time
)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.gantryCode},
#{item.statisticalDate},
#{item.periodType},
#{item.crowdingRate},
#{item.trafficCompositionRate},
#{item.saturationRate},
NOW()
)
</foreach>
ON DUPLICATE KEY UPDATE
gantry_code = VALUES(gantry_code),
statistical_date = VALUES(statistical_date),
period_type = VALUES(period_type),
crowding_rate = VALUES(crowding_rate),
traffic_composition_rate = VALUES(traffic_composition_rate),
saturation_rate = VALUES(saturation_rate),
update_time = NOW()
</insert>
</mapper>