feat: 主要修复订单 save 逻辑 #46

Merged
longbot merged 6 commits from zksu/API:main into main 2026-01-10 07:18:26 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit a8d12a695e - Show all commits

View File

@ -1466,7 +1466,12 @@ export class ProductService {
price: num(rec.price), price: num(rec.price),
promotionPrice: num(rec.promotionPrice), promotionPrice: num(rec.promotionPrice),
type: val(rec.type), type: val(rec.type),
siteSkus: rec.siteSkus ? String(rec.siteSkus).split(',').map(s => s.trim()).filter(Boolean) : undefined, siteSkus: rec.siteSkus
? String(rec.siteSkus)
.split(/[;,]/) // 支持英文分号或英文逗号分隔
.map(s => s.trim())
.filter(Boolean)
: undefined,
category, // 添加分类字段 category, // 添加分类字段
attributes: attributes.length > 0 ? attributes : undefined, attributes: attributes.length > 0 ? attributes : undefined,