日期:2014-05-18  浏览次数:20630 次

mybatis中动态sql里if标签困扰我很久的问题
想使用if标签实现0-99是一个处理,100-999又是一个处理。。。
为什么进不去呢?
<if test="code &gt; 1000 and code &gt; 9999">
      ...
      </if>
     
      <if test=" code &gt; 100 and code &gt; 999">
      ...
      </if>
     
      <if test=" code &gt; 0 and code &gt; 99 ">
      ...
      </if>

还有求大神指教if标签里的结构是怎样的

------解决方案--------------------
<if test=" code >100 and code < 999">
------解决方案--------------------
引用:
<if test=" code >100 and code < 999">

对啊,我记得就是这样啊,没有必要用&gt &lt吧