加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 08:32:33 所属栏目:百科 来源:网络整理
导读:mybatis 多层括号(超过三层)解析不了,加![CDATA[ ]]即可,要么用存视图, 应用在局部也可 select id="selectfirm" resultType="com.esteel.web.entity.CusFirmBean" parameterType="com.esteel.web.beanvo.CusFirmBeanVo" ![CDATA[ select a.*,a.customer_n

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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读