refactor(catalog): 废弃 LEWAN_ 镜像,统一英文 SKU 与积分价,商品图按 SKU 缓存
对外目录只保留英文主 sku;迁移硬删镜像并校准 1元=100积分;发货页/凭证优先使用 local {sku}.webp。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package service
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestIsLegacyLewanMirrorSKU(t *testing.T) {
|
||||
cases := []struct {
|
||||
sku string
|
||||
want bool
|
||||
}{
|
||||
{"LEWAN_8EED3610", true},
|
||||
{"lewan_abc", true},
|
||||
{"Lewan_x", true},
|
||||
{"suit_shadow_gothic", false},
|
||||
{"pack_dragon_palace", false},
|
||||
{"", false},
|
||||
{" LEWAN_X ", true},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
if got := IsLegacyLewanMirrorSKU(tc.sku); got != tc.want {
|
||||
t.Fatalf("IsLegacyLewanMirrorSKU(%q)=%v want %v", tc.sku, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user