一:问题的由来
业务需求在设置最小数量(minCount)时用到了Integer类型,发现设置为0时不能入库
二:解决问题过程
直接在*Mapper.xml中找到对应minCount判断语句@H_403_13@
原写法如下:
<if test="minCount != null" and @H_403_13@minCount != ''@H_403_13@>
@H_403_13@,min_count = #{minCount}
@H_403_13@</if>@H_403_13@
三:解决方法
去掉and minCount != ''
<if test="minCount != null"@H_403_13@</if>@H_403_13@