UPDATE `gao_sales_order_item` SET `product_name_snapshot`=#{productName} WHERE `product_id_snapshot`=#{productId} UPDATE `gao_order_fulfillment_item` SET `product_name_snapshot`=#{productName} WHERE `product_id_snapshot`=#{productId} UPDATE `gao_product_stock_record` SET `product_name_snapshot`=#{productName} WHERE `product_id_snapshot`=#{productId} UPDATE `gao_package_config_item` SET `product_name_snapshot`=#{productName} WHERE `product_id_snapshot`=#{productId} UPDATE `gao_point_redemption` SET `product_name_snapshot`=#{productName} WHERE `product_id_snapshot`=#{productId} UPDATE `gao_sales_order_item` SET `sku_code_snapshot`=#{skuCode}, `sku_name_snapshot`=#{skuName}, `spec_summary_snapshot`=#{specSummary}, `sku_spec_snapshot`=#{skuSpecSnapshot} WHERE `sku_id`=#{skuId} UPDATE `gao_order_fulfillment_item` SET `sku_code_snapshot`=#{skuCode}, `sku_name_snapshot`=#{skuName}, `spec_summary_snapshot`=#{specSummary}, `sku_spec_snapshot`=#{skuSpecSnapshot} WHERE `sku_id`=#{skuId} UPDATE `gao_product_stock_record` SET `sku_code_snapshot`=#{skuCode}, `sku_name_snapshot`=#{skuName}, `spec_summary_snapshot`=#{specSummary}, `sku_spec_snapshot`=#{skuSpecSnapshot} WHERE `sku_id`=#{skuId} UPDATE `gao_package_config_item` SET `sku_code_snapshot`=#{skuCode}, `sku_name_snapshot`=#{skuName}, `spec_summary_snapshot`=#{specSummary} WHERE `sku_id`=#{skuId} UPDATE `gao_point_redemption` SET `sku_code_snapshot`=#{skuCode}, `sku_name_snapshot`=#{skuName}, `sku_spec_snapshot`=#{skuSpecSnapshot} WHERE `sku_id_snapshot`=#{skuId} UPDATE `gao_sales_order_item` SET `unit_snapshot`=#{unitName} WHERE `sku_unit_id`=#{unitId} UPDATE `gao_order_fulfillment_item` SET `unit_snapshot`=#{unitName} WHERE `sku_unit_id`=#{unitId} UPDATE `gao_product_stock_record` SET `unit_snapshot`=#{unitName} WHERE `sku_unit_id`=#{unitId} UPDATE `gao_package_config_item` SET `unit_snapshot`=#{unitName} WHERE `sku_unit_id`=#{unitId} UPDATE `gao_point_redemption` SET `unit_snapshot`=#{unitName} WHERE `sku_unit_id_snapshot`=#{unitId} UPDATE `gao_product_sku` SET `min_stock_quantity`=`min_stock_quantity`*#{ratio} WHERE `id`=#{skuId} AND `min_stock_quantity` IS NOT NULL UPDATE `gao_product_stock` SET `on_hand_quantity`=`on_hand_quantity`*#{ratio}, `reserved_quantity`=`reserved_quantity`*#{ratio}, `updated_at`=FLOOR(UNIX_TIMESTAMP(NOW(3))*1000) WHERE `sku_id`=#{skuId} UPDATE `gao_sales_order_item` SET `base_quantity`=`base_quantity`*#{ratio}, `reserved_base_quantity`=`reserved_base_quantity`*#{ratio}, `fulfilled_base_quantity`=`fulfilled_base_quantity`*#{ratio}, `base_quantity_per_unit_snapshot`=`base_quantity_per_unit_snapshot`*#{ratio} WHERE `sku_id`=#{skuId} UPDATE `gao_order_fulfillment_item` SET `base_quantity`=`base_quantity`*#{ratio}, `reserved_base_before`=`reserved_base_before`*#{ratio}, `reserved_base_after`=`reserved_base_after`*#{ratio}, `fulfilled_base_before`=`fulfilled_base_before`*#{ratio}, `fulfilled_base_after`=`fulfilled_base_after`*#{ratio}, `base_quantity_per_unit_snapshot`=`base_quantity_per_unit_snapshot`*#{ratio} WHERE `sku_id`=#{skuId} UPDATE `gao_product_stock_record` SET `base_quantity`=`base_quantity`*#{ratio}, `on_hand_delta`=`on_hand_delta`*#{ratio}, `reserved_delta`=`reserved_delta`*#{ratio}, `on_hand_before`=`on_hand_before`*#{ratio}, `on_hand_after`=`on_hand_after`*#{ratio}, `reserved_before`=`reserved_before`*#{ratio}, `reserved_after`=`reserved_after`*#{ratio}, `base_quantity_per_unit_snapshot`=`base_quantity_per_unit_snapshot`*#{ratio} WHERE `sku_id`=#{skuId} UPDATE `gao_package_config_item` SET `base_quantity_per_unit_snapshot`=`base_quantity_per_unit_snapshot`*#{ratio} WHERE `sku_id`=#{skuId} UPDATE `gao_point_redemption` SET `base_quantity`=`base_quantity`*#{ratio}, `base_quantity_per_unit_snapshot`=`base_quantity_per_unit_snapshot`*#{ratio} WHERE `sku_id_snapshot`=#{skuId} UPDATE `gao_point_redemption_return` r JOIN `gao_point_redemption` d ON d.`id`=r.`redemption_id` SET r.`base_quantity`=r.`base_quantity`*#{ratio} WHERE d.`sku_id_snapshot`=#{skuId}