关于mybatis 传入基本参数类型使用if test 判断出错的问题
来源:互联网 发布:男生毛孔粗大知乎 编辑:程序博客网 时间:2024/05/16 10:21
在使用mybatis传入基本参数类型时,比如parameterType="java.lang.Long",使用if test 判断会报错,所以需要使用_parameter 当做入参
正确代码:
<select id="findById" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
*
from
reason op
where
1=1
<if test="_parameter != null">
and
id = #{_parameter, jdbcType=BIGINT}
</if>
</select>
0 0
- 关于mybatis 传入基本参数类型使用if test 判断出错的问题
- 关于mybatis的if判断里传入0时的问题
- mybatis if标签test 判断数字遇到的问题
- Mybatis <if test> 判断数字时的问题
- MyBatis if test 字符串判断问题
- MyBatis if test 字符串判断问题
- mybatis if test 字符串判断问题
- 使用mybatis遇到的关于条件查询">"以及if test传参的使用问题
- mybatis的<if test> 条件判断
- mybatis的<if test> 条件判断
- Mybatis的if test字符串比较问题
- Mybatis的if test字符串比较问题
- Mybatis的if test字符串比较问题
- Mybatis的if test字符串比较问题
- Mybatis的if test字符串比较问题
- Mybatis的if test字符串比较问题
- mybatis -if test=--- 的问题
- Mybatis if test 动态判断数字时需要注意的问题
- 概率图模型4:贝叶斯网络
- lightoj 1424
- 给一串数字,判断是否连续
- 机械臂的现状与未来
- Spring自动注入properties文件
- 关于mybatis 传入基本参数类型使用if test 判断出错的问题
- 蓝桥杯基础题(3,4题)
- 初学HTML小结
- 3. web.xml 中的listener、 filter、servlet 加载顺序及其详解
- bzoj3442 学习小组
- bp神经网络及matlab实现
- 苹果紧急发布的iOS10.3.1更新了什么内容
- 配置电子邮件传输+mariadb
- java学习 三、八大基本类型