mybatis mapper.xml中的if判断

<if test="user.username != null and user.username != ''">
            AND u.username = #{user.username}
</if>

作用:if语句用于过滤掉前端的空数据

猜你喜欢

转载自www.cnblogs.com/0710whh/p/12310733.html