Commit ef917c8b by 杨林龙

优化SQL插入

1 parent 1dfc6332
......@@ -25,12 +25,12 @@
<insert id="saveOrUpdateDeviceLocationData">
INSERT INTO t_device_location (sn,last_gps_time,last_bs_time,created_time,updated_time)
values
<foreach collection="deviceLocationDtoList" item="deviceLocation" open="(" separator="," close=")">
#{deviceLocation.sn},
<foreach collection="deviceLocationDtoList" item="deviceLocation" separator=",">
(#{deviceLocation.sn},
#{deviceLocation.lastGpsTime},
#{deviceLocation.lastBsTime},
#{deviceLocation.createdTime},
#{deviceLocation.updatedTime}
#{deviceLocation.updatedTime})
</foreach>
ON DUPLICATE KEY UPDATE
sn=values(sn),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!