码迷,mamicode.com
首页 > 其他好文 > 详细

mysbatis中的Dao.xml的配置中如果属性不是string类型不能用 attribute(属性) != null 来判断,否则失效,无法注入。

时间:2020-04-07 22:08:43      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:java   test   parentId   str   class   int   integer   ring   har   

 <if test="parentId != null and parentId != ‘‘">
      AND bc.`parent_id` = #{parentId, jdbcType=VARCHAR}
    </if>
    <if test="deleteStatus != null">
      AND bc.`delete_status` = #{deleteStatus, jdbcType=INTEGER}
    </if>

  

mysbatis中的Dao.xml的配置中如果属性不是string类型不能用 attribute(属性) != null 来判断,否则失效,无法注入。

标签:java   test   parentId   str   class   int   integer   ring   har   

原文地址:https://www.cnblogs.com/zhengzihao/p/12656307.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!