<insert id="saveItemInput" parameterType="java.util.Map" useGeneratedKeys="false" keyProperty="id">
insert into ${tableName} (
<foreach collection="map" item="value" index="key" separator=",">
${key}
</foreach>
)
values (
<foreach collection="map" item="value" index="key" separator=",">
#{value}
</foreach>
)
</insert>
调用接口
Integer saveItemInput(String tableName,Map map)