mybatis 里面使用<if test=""> 判断,当后台传的值是数字字符串时,怎么处理
来源:互联网 发布:js调用windows命令 编辑:程序博客网 时间:2024/05/16 18:42
<select id="getByNameAndPwd" parameterType="String" resultMap="MemberResult">
select
*
from `member`
<if test="isMerch != '' and isMerch == '1'.toString() " >
where `mobile` = #{name}
and `password` = #{password}
</if>
<if test="isMerch != '' and isMerch == '2'.toString() " >
where `name` = #{name}
and `password` = #{password}
select
*
from `member`
<if test="isMerch != '' and isMerch == '1'.toString() " >
where `mobile` = #{name}
and `password` = #{password}
</if>
<if test="isMerch != '' and isMerch == '2'.toString() " >
where `name` = #{name}
and `password` = #{password}
</if>
</select>
如上所示:要在数字字符串后面加.toString()方法,否则将无法识别。
阅读全文
0 0
- mybatis 里面使用<if test=""> 判断,当后台传的值是数字字符串时,怎么处理
- Mybatis <if test> 判断数字时的问题
- myBatis查询某个时间区间数据<if test=""> 如何写判断条件,and 里面的内容怎么写?
- 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字符串比较问题
- servlet session管理之一 重写
- as gradle和gradle插件的配置
- Uva10795 新汉诺塔问题(转化模型,经典题)
- php快速高效验证邮箱,长度限制
- Python编程笔记
- mybatis 里面使用<if test=""> 判断,当后台传的值是数字字符串时,怎么处理
- 云计算选择的三大必然因素
- SSL证书部署指南(https)
- php清除缓存
- ssm+mysql三级省市区级联
- pandas数据合并与重塑---join、merge方法
- windows下xgboost安装
- C++中的默认函数与default和delete用法
- 移动架构34_Android中解析xml文件