mybatis的xml文件中的CDATA的使用
mybatis的xml文件中的CDATA的使用
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
<!--查询列表--> <select id="queryListPage" parameterType="java.util.Map" resultType="java.util.Map"> select * from user where 1=1 <if test="startDate != null and startDate != ''"> <![CDATA[and DATE_FORMAT(CREATE_DATA,"%Y-%m-%d") >= #{startDate}]]> </if> <if test="endDate != null and endDate != ''"> <![CDATA[and DATE_FORMAT(CREATE_DATA,"%Y-%m-%d") <= #{endDate}]]> </if> <if test="PAGE_INDEX !=null and PAGE_SIZE !=''"> LIMIT ${PAGE_INDEX},${PAGE_SIZE} </if> </select>

更多精彩