标签:contain 灵活 sep set key cli 库存 highlight select
1
2
3
4
5
6
7
8
9
|
< insert id= "saveMatchResult" > INSERT INTO sp4_acl_so (acl_id, so_uuid__proc_def_id) <foreach collection= "aclDeviceMap.keys" index = "index" item= "item" separator= "UNION ALL" > <foreach collection= "aclDeviceMap[item]" index = "index_set" item= "set" separator= "UNION ALL" > SELECT #{item.aclId}, #{ set } FROM DUAL </foreach> </foreach> </ insert > |
aclDeviceMap:就是在接口中使用@Param("aclDeviceMap")标注了变量
Mybatis foreach嵌套遍历Map的key和value
标签:contain 灵活 sep set key cli 库存 highlight select
原文地址:https://www.cnblogs.com/a-du/p/12697039.html