mybatis注意事项

判断
<if test="dto.value != null"></if> <if test="dto.value == null"></if>

 

枚举值比较
<if test="dto.value == @com.baiawnx.common.enums.TypeEnum@one"></if>

 

if-else
<choose> <when test="dto.column == 1"> and 1 = 1 </when> <when test="dto.column == 2"> and 2 = 2 </when> <otherwise> and 3 = 3 </otherwise> </choose>

 

 
posted @ 2021-11-30 20:04  baissy  阅读(17)  评论(0编辑  收藏  举报