解决xml sql多层()不能解析问题

前端之家收集整理的这篇文章主要介绍了解决xml sql多层()不能解析问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

mybatis 多层括号(超过三层)解析不了,加<![CDATA[ ]]>即可,要么用存视图,应用在局部也可

<select id="selectfirm" resultType="com.esteel.web.entity.CusFirmBean" parameterType="com.esteel.web.beanvo.CusFirmBeanVo">

<![CDATA[

select a.*,a.customer_name as customerName from tb_cus_firm a where a.market_key = #{marketKey} order by customer_key

]]>

</select>

<select id="getEmailCount" parameterType="map" resultMap="account1Map">

SELECT * FROM TB_CUS_USER WHERE 1=1

<if test="EMAIL!=null and EMAIL!=''">

and EMAIL=#{EMAIL}

</if>

<if test="CUS_TRADE_KIND!=null and CUS_TRADE_KIND!=''">

and CUS_TRADE_KIND =#{CUS_TRADE_KIND}

</if>

<if test="CUS_USER_KEY!=null and CUS_USER_KEY!=''">

and cus_user_key <![CDATA[<>]]> #{CUS_USER_KEY}

</if>

</select>

原文链接:https://www.f2er.com/xml/294947.html

猜你在找的XML相关文章