mysql 批量添加
insert into za_device_attribute (device_id,`key`,`value`,type) values
<foreach collection="lierdaluxAtts" item="LierdaluxAtt" index="index" separator="," >
(#{LierdaluxAtt.deviceId}, #{LierdaluxAtt.key}, #{LierdaluxAtt.value},#{LierdaluxAtt.type} )
</foreach>
ON DUPLICATE KEY UPDATE
device_id=values (device_id),
`key`=values (`key`),
`value`=values (`value`),
type=values(type)