gongchunyi
21 小时以前 bfc816fe3757d7c0b1f95a18e8ec9fbc3e717ae1
src/main/resources/mapper/stock/StockUninventoryMapper.xml
@@ -25,7 +25,8 @@
            </if>
            update_time = now()
        </set>
        where product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity}
        where product_model_id = #{ew.productModelId}
          and (qualitity - COALESCE(locked_quantity, 0)) >= #{ew.qualitity}
    </update>
    <update id="updateAddStockUnInventory">
        update stock_uninventory
@@ -55,6 +56,7 @@
        (su.qualitity - COALESCE(su.locked_quantity, 0)) as un_locked_quantity,
        pm.model,
        pm.unit,
        pm.thickness,
        p.product_name
        from stock_uninventory su
        left join product_model pm on su.product_model_id = pm.id