mybatis 参数为list时,校验list是否为空

校验objStatusList 是否为空

<if test="objStatusList != null and objStatusList.size() > 0 ">
  and
  <foreach collection="objStatusList" index="objStatusList" item="obj_status" open="(" separator="or" close=")">
    obj_status = #{obj_status}
  </foreach>
</if>

posted @ 2017-07-21 10:50  张倩要好好学习  阅读(4249)  评论(0编辑  收藏  举报