mybatis SELECT FROM vmi_materialdocument where if test=material != null and material != AND Material = #material if wh
SELECT
*
FROM
vmi_materialdocument
<if test="material != null and material != ''">
AND Material = #{material}
</if>
<if test="quantityInBaseUnit != null">
AND (QuantityInBaseUnit - IFNULL(ArtificialConsume, 0) - IFNULL(AutomaticConsume, 0)) > 0
</if>
ORDER BY PostingDate
原文地址: https://www.cveoy.top/t/topic/iM1q 著作权归作者所有。请勿转载和采集!