mybatis 中test里面 應該為單引號套雙引號


正確寫法: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.  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM