在mapping文件中实现动态sql,如果想达到if else的效果可以使用:choose, when, otherwise
<choose>
<when test="title != null"></when>//可以多个
<otherwise><otherwise>
</choose>
定制where语句
在mapping文件中实现动态sql,如果想达到if else的效果可以使用:choose, when, otherwise
<choose>
<when test="title != null"></when>//可以多个
<otherwise><otherwise>
</choose>
定制where语句
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。