如下图,当unitTypeExtend
为0时,参数判断<if test="unitTypeExtend!= null and '' != unitTypeExtend ">
失效,原因是因为当参数unitTypeExtend
为0时,''!=unitTypeExtend
判断会将unitTypeExtend转化为空字符串去进行条件判断,导致条件判断失效
因此当传值为数字类型时,如下图只需要判断unitTypeExtend!= null
就行
如下图,当unitTypeExtend
为0时,参数判断<if test="unitTypeExtend!= null and '' != unitTypeExtend ">
失效,原因是因为当参数unitTypeExtend
为0时,''!=unitTypeExtend
判断会将unitTypeExtend转化为空字符串去进行条件判断,导致条件判断失效
因此当传值为数字类型时,如下图只需要判断unitTypeExtend!= null
就行