refactor: 迁移增量同步开关到渠道侧

This commit is contained in:
2026-08-21 12:17:07 +08:00
parent e030ca6e0a
commit b6891b16e3
12 changed files with 159 additions and 64 deletions
@@ -14,7 +14,6 @@ CREATE TABLE `ec_shop` (
`logo_image_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT 'logo图片ID',
`logo_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'logo外链URL(渠道授权等;查询时有 logo_image_id 则覆盖)',
`platform_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '平台代码(软约定枚举,无平台表)',
`order_inc_sync_enabled` tinyint NOT NULL DEFAULT 0 COMMENT '订单增量同步开关:0关 1开(产品配置,与渠道运行态分离)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`create_by` bigint UNSIGNED NULL DEFAULT NULL COMMENT '创建人ID',
@@ -22,7 +21,6 @@ CREATE TABLE `ec_shop` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_company_id`(`company_id` ASC) USING BTREE,
INDEX `idx_platform_code`(`platform_code` ASC) USING BTREE,
INDEX `idx_ec_shop_order_inc_sync`(`platform_code` ASC, `order_inc_sync_enabled` ASC) USING BTREE COMMENT '增量同步 Job 扫描',
INDEX `fk_ec_shop_logo_image`(`logo_image_id` ASC) USING BTREE,
INDEX `fk_ec_shop_creator`(`create_by` ASC) USING BTREE,
INDEX `fk_ec_shop_updater`(`update_by` ASC) USING BTREE,