Mybatis sql map 小於號配置

Mybatis SQL map配置中出現小於號轉義時,經過<![CDATA[查詢條件]]>解決。spa

 

EXCEMPLE:get

<select id="getComments" parameterType="Pagination" resultType="CustomerComments">
  SELECT * FROM kk_customercomments
  <if test="condition != null">
    WHERE true
      <if test="condition.enddate != null">
        and <![CDATA[COMMENTSDATE <= '${condition.enddate}']]>
      </if>
  </if>
</select>it

相關文章
相關標籤/搜索