没有合适的资源?快使用搜索试试~ 我知道了~
Mybatis在Mapper.xml文件中的转义字符处理方式.pdf
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
温馨提示
Mybatis在Mapper.xml文件中对大于、小于、大于等于、小于等于等符号进行转义字符处理的几种方式
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![xml](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/12917889/bg1.jpg)
字符 转义 说明
< < 小于
<= <= 小于等于
> > 大于
>= >= 大于等于
<> <> 不等于
& & 和
’ ' 单引号
" " 双引号
Mybatis在Mapper.xml文件中的转义字符处理方式
1、常用的XML转义字符写法
2、使用CDATA标志处理转义字符
3、应用案例
Mybatis在Mapper.xml文件中的转义字符处理方式
1、常用的XML转义字符写法
2、使用CDATA标志处理转义字符
3、应用案例
<![CDATA[ sql语句 ]]>
//使用<![CDATA[ sql语句 ]]>来处理
<select id="selectByPage" resultMap="BaseResultMap">
select *,Date(expire_date)-current_date as expireDays from tb_insurance
<where>
<if test="vehicleNum != null and vehicleNum != ''">
and vehicle_num = #{vehicleNum}
</if>
<choose>
<when test="typeName == '即将到期'.toString()">
and Date(expire_date)-current_date <![CDATA[ > 0 ]]>
and Date(expire_date)-current_date <![CDATA[ <= #
{expireDays,jdbcType=INTEGER}]]>
</when>
<when test="typeName == '已过期'.toString()">
and current_date-Date(expire_date) <![CDATA[ >= #
{expireDays,jdbcType=INTEGER}]]>
</when>
<otherwise>
and Date(expire_date)-current_date <![CDATA[ <= 30]]>
</otherwise>
![avatar](https://profile-avatar.csdnimg.cn/c99fd39dee1146bdbfc3701345bb8d75_hlli86.jpg!1)
hlli86
- 粉丝: 11
- 资源: 9
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
- 1
- 2
前往页