mybatis 遍历Map, 和map 里面的 List 集合
遍历Map, 和map 里面的 List 集合
<select id="getCityName" resultType="string">
select city_id from space_resources
where 1=1
<foreach collection="cityInfo" index="key" item="value" open="" separator=" " close="">
and ${key} in
<foreach collection="value" item="v" open="(" separator="," close=")">
#{v}
</foreach>
</foreach>
limit 20
</select>

浙公网安备 33010602011771号