mybatis foreach标签separator
mybatis会在每次迭代后给sql语句append上separator属性指定的字符
<foreach collection="list" item="item" separator="or"> id = #{item.id} AND name = #{item.name} </foreach>
今天批量查询错误写为 separator=","
mybatis会在每次迭代后给sql语句append上separator属性指定的字符
<foreach collection="list" item="item" separator="or"> id = #{item.id} AND name = #{item.name} </foreach>
今天批量查询错误写为 separator=","