Mybatis mapper.xml文件中list集合的判断

2022-08-22 10:48:33

判断为空

<if test="idList != null and idList.size > 0">

判断下标的值

<choose>
    <when test='idList.size == 1 and idList[0] == "123"'>
        ...
    </when>
    <otherwise>
        ...
    </otherwise>
</choose>
  • 作者:ooooooooooooooxiaosu
  • 原文链接:https://blog.csdn.net/xiaoxiao_su123/article/details/115243207
    更新时间:2022-08-22 10:48:33