mybatis传值同时传入list和string该怎么弄

2025-05-06 08:41:08
推荐回答(1个)
回答1:

参数用map
insert into table

select #{key1}, #{key2}, #{item.value}


调用方法

Map map = new HashMap();
map.put("key1", value1);
map.put("key2", value2);
map.put("list", list);
mapper.insert(map);