mybatis 解析Integer为0的属性,解析成空字符串
当status或者hourStatus为0时
你会发现sql上根本没有status、hour_status字段
原因是当type为Integer类型,并且type值为0时,该if判断为false。当type为0时,Mybatis会解析成'' 空字符串。
修改为
问题解决
当status或者hourStatus为0时
你会发现sql上根本没有status、hour_status字段
原因是当type为Integer类型,并且type值为0时,该if判断为false。当type为0时,Mybatis会解析成'' 空字符串。
修改为
问题解决