mybatis的xml中使用foreach循环拼接(sql中的 in 语法)
其中stateLists是一个字符串数组,也是参数
and state in
<foreach collection="stateLists" separator="," index="index" item="item" open="(" close=")">
#{item}
</foreach>
其中stateLists是一个字符串数组,也是参数
and state in
<foreach collection="stateLists" separator="," index="index" item="item" open="(" close=")">
#{item}
</foreach>