fix: 男装季节码不再一律 FW + 本地图迁移到 S4 的工具

男装季节码
- prefixOf 里 menswear 原来直接 return "FW",导致同年 Spring/Fall 男装推出同一个
  season_code(如 Spring 2021 与 Fall 2021 都是 FW21)。实体键是
  (brand + season_code + collection_type),后到的那场被判「已存在」静默丢弃。
- 改为按真实季节:春男装 SSyy、秋男装 FWyy。
- 迁移 2026-10-25-03 把历史「Spring ... Menswear」行的 season_code 由 FWyy 改写为 SSyy;
  实测无唯一键冲突(同品牌春夏男装此前必然因撞键未入库)。

s4migrate
- 新增 cmd/s4migrate:把库里 /uploads/... 的历史图片按内容寻址 key 上传到 S4,
  并改写图片行与封面,之后全站只保留 S4 一种存储(不再依赖 nginx 转发 /uploads)。
- 实测:136 张全部迁移成功,库内 /uploads 残留 0。
This commit is contained in:
toom1996
2026-10-25 14:55:30 +08:00
parent 64b264ee73
commit d6ed96624a
3 changed files with 167 additions and 0 deletions

View File

@ -46,6 +46,16 @@ func prefixOf(collectionType, season string) string {
// 高定沿用秋冬编码(FW),与排序优先级一致
return "FW"
case ColMenswear:
// 男装必须按真实季节区分:曾经一律返回 FW,导致同年的
// 「Spring 2021 Menswear」与「Fall 2021 Menswear」推出同一个 season_code(FW21),
// 而实体键是(品牌 + season_code + 系列),于是后到的那场被判「已存在」静默丢弃。
// 实测 AMBUSH:Vogue 25 场只入库 21 场,缺的 4 场全是男装。
switch season {
case SeasonSpring:
return "SS"
case SeasonFall:
return "FW"
}
return "FW"
}
switch season {