The map type is unordered, but I tested hundreds of data without any confusion
xml like this:
insert into AA
<foreach collection="map.keySet()" item="key" separator="," open="(" close=")">
${key}
</foreach>
values
<foreach collection="map.values()" item="val" separator="," open="(" close=")">
#{val}
</foreach>
interface code like this:
int insertHT(@Param("map") Map<String, Object> map);
map is {"aa":"11","bb":"22"}
insertHT,I have performed this 100 times
I don't know whether this is correct or whether the data will always be inserted correctly