mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 03:19:18 +08:00
feat: 接入拼多多商品 PMC 消息并软标平台删除
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
-- 拼多多商品:平台删除标记(消息 Delete 软标,不物理删渠道行)
|
||||
ALTER TABLE `channel_pdd_goods`
|
||||
ADD COLUMN `is_platform_deleted` tinyint NOT NULL DEFAULT 0
|
||||
COMMENT '平台是否已删除 0否 1是' AFTER `is_onsale`,
|
||||
ADD INDEX `idx_channel_pdd_goods_platform_deleted` (`company_id`, `is_platform_deleted`);
|
||||
|
||||
-- 拼多多消息入站幂等表
|
||||
CREATE TABLE IF NOT EXISTS `channel_pdd_msg_inbox` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`platform_msg_id` bigint UNSIGNED NOT NULL COMMENT '幂等键(type+mall+content 指纹;SDK 不暴露 ServerMessage.id)',
|
||||
`msg_type` varchar(128) NOT NULL COMMENT '消息 type,如 pdd_goods_GoodsUpdate',
|
||||
`mall_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT '拼多多 mall_id',
|
||||
`company_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT '解析后的公司ID',
|
||||
`channel_shop_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT '解析后的渠道店ID',
|
||||
`goods_id` varchar(64) NULL DEFAULT NULL COMMENT '业务键:商品ID(可空)',
|
||||
`content_json` json NULL COMMENT '消息 content 原文',
|
||||
`status` varchar(32) NOT NULL DEFAULT 'RECEIVED' COMMENT 'RECEIVED/QUEUED/SUCCESS/FAILED/IGNORED',
|
||||
`fail_reason` varchar(1000) NULL DEFAULT NULL COMMENT '失败原因',
|
||||
`retry_count` int NOT NULL DEFAULT 0 COMMENT '业务处理重试次数',
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_channel_pdd_msg_inbox_platform` (`platform_msg_id`),
|
||||
KEY `idx_channel_pdd_msg_inbox_status` (`status`, `id`),
|
||||
KEY `idx_channel_pdd_msg_inbox_mall_type` (`mall_id`, `msg_type`),
|
||||
KEY `idx_channel_pdd_msg_inbox_shop` (`channel_shop_id`, `id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='拼多多消息入站幂等表';
|
||||
Reference in New Issue
Block a user