问题复现:
<if test="checkResult != null and checkResult != '' "> and check_result = #{checkResult}</if>
原因是checkResult是Intager类型的,而mybatis != ‘ ’就是认为长度为0,所以这两个判断下来为true
正确代码:
<if test="checkResult != null"> and check_result = #{checkResult}</if>
文章摘要
智阅GPT问题复现:
<if test="checkResult != null and checkResult != '' "> and check_result = #{checkResult}</if>
原因是checkResult是Intager类型的,而mybatis != ‘ ’就是认为长度为0,所以这两个判断下来为true
正确代码:
<if test="checkResult != null"> and check_result = #{checkResult}</if>
用键盘敲击出的不只是字符,更是一段段生活的剪影、一个个心底的梦想。希望我的文字能像一束光,在您阅读的瞬间,照亮某个角落,带来一丝温暖与共鸣。
文章内容不具时效性。若文章内容有错误之处,请您批评指正。
目录
阅读主题设置
分享文章
默认评论
Halo系统提供的评论