mybatis 的 if-test 判断数据是否为空 或者 字符串是否为空

判断String类型的 数据是否为空或者为空字符串。

s.longitude=#{longitude}

判断 Integer、Double等其他类型是,不能使用 != “”
因为 在 Integer、Double类型中 对象属性值为 0 ,会被mybaits 会判断 对象==""。所以针对 Integer、Double等类型 只需要

s.longitude=#{longitude}

你可能感兴趣的:(数据库,mybatis,if-test)