mybatis批量查询

<foreach collection="list" item="item" open="(" separator="," close=")">
			#{item}
		</foreach>

  批量删除

<delete id="delByIds" parameterType="java.lang.String">
        DELETE FROM trust_ip_segment
        WHERE
            id in
            <foreach collection="array" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>

    </delete>

 

posted @ 2020-10-10 15:19  oc-long  阅读(225)  评论(0编辑  收藏  举报