mybatis 中test里面 应该为单引号套双引号

时间:2018-09-20 15:42:45   收藏:0   阅读:730

正确写法:test里面 应该为单引号套双引号

 

 

  1.  
    <select id="findTopicPresetByCompanyIDAndCategory" parameterType="map" resultType="com.seeyon.esn.entity.portal.TopicPreset">
  2.  
    select * from topicPreset where companyID = #{companyID}
  3.  
    <if test=‘category=="0" ‘> and (category is null or category = "0")</if>
  4.  
    <if test=‘category=="1" ‘> and category = "1"</if>
  5.  

原文:https://www.cnblogs.com/jcfxl/p/9680732.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!