mybatis if-else

说明:

if else 是用choose when otherwise
choose为一个整体, when是if , otherwise是else

<choose>
    <when test="1.equals(1)">
        //代码块儿1
    </when>
    <otherwise>
        //代码块儿2
    </otherwise>
</choose>

官网:

MyBatis-Plus (baomidou.com)

posted @ 2021-06-11 13:51  Journey&Flower  阅读(76)  评论(0)    收藏  举报