feat: 建立全局店铺跨渠道管理 (#208 #209 #210 #211)

This commit is contained in:
chengma
2026-08-13 11:15:54 +08:00
parent 901b37a8cb
commit 8f707722ba
28 changed files with 1160 additions and 500 deletions
+24 -5
View File
@@ -165,6 +165,7 @@ func (p PddProduct) IsDeleted() bool {
// 采集结果和采集状态**不在这里**——它们属于 PDD 商品,见 PddProduct。
type ShopeeProduct struct {
GoodsID string
ShopID string // 关联全局业务店铺;原始渠道店铺名仍单独保留
Title string
ShopeeStatus string
MainSKUCode string
@@ -219,6 +220,7 @@ type ShopeeSKU struct {
type SybOrder struct {
SybID string
OrderNo string
ShopID string // 由 SYB 渠道别名精确解析,无法识别时为空
ShopName string // 顺运宝货运单级 shopName;同一货运单的商品明细相同
Title string
ProductSpec string // 规格原文,顺运宝 productSpec,原样保留,对应 shopee_skus.spec_raw
@@ -266,13 +268,30 @@ type SybSyncRun struct {
FinishedAt string
}
// SybAllowedShop 是顺运宝同步的全局店铺准入项。
type SybAllowedShop struct {
// Shop 是跨 SYB、Shopee 等渠道共享的业务店铺身份。
// 渠道返回的原始名称保存在各业务表和 ShopChannelAlias 中,不用显示名替代。
type Shop struct {
ShopID string
DisplayName string
NormalizedName string
Enabled bool
SybAlias string
SybSyncEnabled bool
ShopeeAlias string
ShopeeProductCount int
CreatedByUserID string
CreatedAt string
UpdatedAt string
}
// ShopChannelAlias 把一个渠道中的精确名称映射到稳定业务店铺。
type ShopChannelAlias struct {
AliasID string
ShopID string
ShopName string
NormalizedName string
Channel string // syb / shopee
AliasName string
NormalizedAlias string
Enabled bool
CreatedByUserID string
CreatedAt string
UpdatedAt string
}