mybatis使用经验

222 阅读1分钟

动态SQL

判断属性是否为空时,

如果字段是String类型的,则使用 <if test="project !=null and !project.equals('')">……</if>

如果字段是Integer类型的,则使用 <if test="id!=null">……</if>