feat(pickup): 店铺管理支持历史店铺可视化手动映射与一键批量清洗
- 数据库升级:新增 pickup_shop_mappings 映射别名表,并在 admin_pickups 增加 raw_shop_name 永久保留原始店铺录入值 - 后端映射能力:提供历史店铺聚合统计、单条/批量映射至目标标准店铺、映射规则撤销与提号单还原接口;新建提号时若录入已映射别名自动归一化 - 前端管理升级:PickupShopDialog 升级为双 Tab 结构,Tab 2「历史店铺映射与清洗」支持总览统计卡片、状态筛选、单条/批量映射清洗、一键设为标准店铺及撤销还原 - 验证方式:执行并通过全套代码门禁(scripts/check.sh:SQL约束、go vet/build/test、MySQL测试库覆盖率、vue大小、eslint、prettier、vue-tsc及vite构建)
This commit is contained in:
@@ -62,6 +62,7 @@ type PickupDTO struct {
|
||||
Platform string `json:"platform"`
|
||||
ThirdPartyOrderNo string `json:"third_party_order_no"`
|
||||
ShopName string `json:"shop_name"`
|
||||
RawShopName string `json:"raw_shop_name"`
|
||||
AccountSource string `json:"account_source"`
|
||||
SourceChannel string `json:"source_channel"`
|
||||
SettlementMode string `json:"settlement_mode"`
|
||||
@@ -195,6 +196,39 @@ type PickupShopQuery struct {
|
||||
Status string
|
||||
}
|
||||
|
||||
type PickupShopHistoricalItemDTO struct {
|
||||
SourceName string `json:"source_name"`
|
||||
Count int64 `json:"count"`
|
||||
MappingStatus string `json:"mapping_status"` // standard, mapped, unmapped
|
||||
TargetShopID uint64 `json:"target_shop_id,omitempty"`
|
||||
TargetShopName string `json:"target_shop_name,omitempty"`
|
||||
Remark string `json:"remark,omitempty"`
|
||||
}
|
||||
|
||||
type PickupShopHistoricalStatsDTO struct {
|
||||
Items []PickupShopHistoricalItemDTO `json:"items"`
|
||||
TotalPickups int64 `json:"total_pickups"`
|
||||
TotalShops int `json:"total_shops"`
|
||||
StandardCount int `json:"standard_count"`
|
||||
MappedCount int `json:"mapped_count"`
|
||||
UnmappedCount int `json:"unmapped_count"`
|
||||
}
|
||||
|
||||
type MapHistoricalShopsRequest struct {
|
||||
FromShopNames []string `json:"from_shop_names" binding:"required,min=1"`
|
||||
TargetShopName string `json:"target_shop_name" binding:"required,max=100"`
|
||||
CreateTargetMissing bool `json:"create_target_missing"`
|
||||
TargetPlatform string `json:"target_platform" binding:"max=32"`
|
||||
Remark string `json:"remark" binding:"max=255"`
|
||||
}
|
||||
|
||||
type MapHistoricalShopsResultDTO struct {
|
||||
UpdatedPickupsCount int64 `json:"updated_pickups_count"`
|
||||
TargetShopName string `json:"target_shop_name"`
|
||||
TargetShopID uint64 `json:"target_shop_id"`
|
||||
CreatedStandardShop bool `json:"created_standard_shop"`
|
||||
}
|
||||
|
||||
type SellerPickupQuery struct {
|
||||
Page int
|
||||
PageSize int
|
||||
|
||||
Reference in New Issue
Block a user