1、>  < 等符号在mybatis中的sql语句需要转义

> : &gt;

< : &lt;

 

2、mybatis动态选择

<choose>  
    <when test="startTime != null">  
        #{startTime},
    </when>   
    <otherwise>  
        #NOW(),
    </otherwise>  
</choose> 

 

相关文章: