if标签通常用于WHERE语句、UPDATE语句、INSERT语句中,通过判断参数值来决定是否使用某个查询条件、判断是否更新某一个字段、判断是否插入某个字段的值。 简单示例 select host_name as hostName from t_node_agent where t.f_flag =1 <if test=" osType != null and osType != '' "> and t.os_type=#{ osType} </if> if标签的test属性必填,该属性值是一