feat(store): 添加门店、门店验证

This commit is contained in:
R524809
2026-09-04 10:27:29 +08:00
parent 66ca8b496c
commit 70d9d5b92a
19 changed files with 602 additions and 26 deletions
+2
View File
@@ -84,6 +84,8 @@ export type Platform = {
supported_currencies: string[];
default_market_code: string | null;
default_locale: string | null;
/** 平台新建店铺时预选的计价币种;未配置时前端回退到第一项可用币种。 */
default_currency_code: string | null;
};
/** GET /api/platform-context 返回的页头上下文;没有默认店铺不是错误。 */
@@ -0,0 +1,15 @@
-- Ozon 店铺默认以人民币计价;保留 RUB 作为平台支持币种。
-- 使用独立迁移,确保已初始化的数据库也会获得该配置。
SET search_path TO atlas, public;
INSERT INTO platform_currency_support (platform_id, currency_code)
SELECT id, 'CNY'::CHAR(3)
FROM platforms
WHERE code = 'OZON'
ON CONFLICT (platform_id, currency_code) DO UPDATE
SET is_enabled = true;
UPDATE platforms
SET capabilities = capabilities || jsonb_build_object('default_currency_code', 'CNY'),
updated_at = now()
WHERE code = 'OZON';