SQL动态查询之多条件动态查询中where标签和if test的使用
代码复制过来直接使用
<where>
<if test=" status != null">
status = #{status}
</if>
<if test="brandName != null and brandName != ''">
and brand_name like #{brandName}
</if>
<if test = "companyName != null and companyName != ''">
and company_name like #{companyName};
</if>
</where>