bailun_sku,warehouse_code,SUM(bailun_sku_quantity_ordered) AS bailun_sku_quantity_ordered,SUM(bailun_sku_quantity_pushed) AS bailun_sku_quantity_pushed
bailun_sku,warehouse_code,SUM(bailun_sku_quantity_ordered) AS bailun_sku_quantity_ordered,SUM(bailun_sku_quantity_pushed) AS bailun_sku_quantity_pushed,
sum(case when platform_type = 'Aliexpress' then bailun_sku_quantity_ordered - bailun_sku_quantity_pushed else 0 end) as aliexpress_quantity
FROM
dc_base_oms_sku
WHERE
...
...
@@ -811,7 +813,7 @@
<updateid="updateOldOutStockToZero">
update dc_mid_transit set quantity_out_stock =0 where gmt_out_stock_modified < #{outStockModified,jdbcType=TIMESTAMP}
update dc_mid_transit set quantity_out_stock =0, quantity_out_stock_aliexpress = 0 where gmt_out_stock_modified < #{outStockModified,jdbcType=TIMESTAMP}
</update>
<updateid="updateOldTransferToZero">
update dc_mid_transit set quantity_transfer =0 where gmt_transfer_modified < #{transferModified,jdbcType=TIMESTAMP}