-- 1.0.348 停用 S3 已废弃的本地 InvMaster 拉取。
-- 库存余额统一由 S5 LocationDetail -> mdp_std_inventory 链路提供。
SET NAMES utf8mb4;

UPDATE `mdp_entity`
SET `status` = 0,
    `remark` = CONCAT(
        IFNULL(`remark`, ''),
        CASE
            WHEN IFNULL(`remark`, '') LIKE '%INV-CONVERGENCE: S3 inventory uses S5 LocationDetail standard chain%'
                THEN ''
            ELSE ' | INV-CONVERGENCE: S3 inventory uses S5 LocationDetail standard chain'
        END
    ),
    `update_time` = NOW()
WHERE `entity_code` = 'S3_INVENTORY';
