问题:
查询前面的结算是否完成的时候,出现了期数参数无效的情况。
原因:
Mybatis 标签把 0 当作null
处理了
**
解决办法:**
1. 判断如果参数为1的时候不做查询,因为没有必要。
2. 把0加上单引号引号。
<if test="null!=endPeriod and (endPeriod==0 ? '0' : endPeriod)">
AND period=#{endPeriod}
</if>
.
感谢您的阅读,欢迎参观我的个人网站:小嗨词典【 https://www.happydict.cn】
.