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

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

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

@H_404_4@

@H_404_4@

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

<![CDATA[@H_404_4@

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

]]>@H_404_4@

</select>@H_404_4@

@H_404_4@

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

SELECT * FROM TB_CUS_USER WHERE 1=1@H_404_4@

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

and EMAIL=#{EMAIL}@H_404_4@

</if>@H_404_4@

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

and CUS_TRADE_KIND =#{CUS_TRADE_KIND}@H_404_4@

</if>@H_404_4@

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

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

</if>@H_404_4@

</select>@H_404_4@

猜你在找的XML相关文章