首先在mybatis语法中是没有 if else写法得,

不过有他的替代 choose,写法如下:
<choose>
<when test="params!=null">
right JOIN
</when>
<otherwise>
LEFT JOIN
</otherwise>
</choose>
以上即可实现 if else 逻辑
版权所有 © 【代码谷】 欢迎非商用转载,转载请按下面格式注明出处,商业转载请联系授权,违者必究。(提示:点击下方内容复制出处)
源文:《mybatis if else》,链接:https://www.daimagu.com/article/765.html,来源:【代码谷】
评论