mybatis传集合参数 注意事项

来源:互联网 发布:社交网络关系图 编辑:程序博客网 时间:2024/06/01 07:25
 <if test="serverIds!=null">       and serverId in         <foreach item="item" index="index" collection="serverIds" open="(" separator="," close=")">    #{item}  </foreach>        </if>
这里面serverIds是一个集合 传参是时候 if中test不能跟“”  或者其他字符串 比较
原创粉丝点击