记录学习的点滴(Eclipse+Spring+Mybatis搭建问题总结)

来源:互联网 发布:电子图书数据库有哪些 编辑:程序博客网 时间:2024/06/09 13:46

1,Mybatis的if test字符串比较

<if test=" orderByKey == ’x’ "> S1.USER_NAME DESC </if>这样子是不可以的

修改为<if test=' orderByKey == "x" '> S1.USER_NAME DESC </if>

Mybatis没有else标签,可以使用以下代码。

   <choose>
  <when test=' orderByKey == "x" '> S1.OPEN_CD DESC </when>
  <otherwise> S1.USER_NAME DESC </otherwise>
   </choose>

0 0
原创粉丝点击