zksu
/
API
forked from yoone/API
1
0
Fork 0

chore: 但存在 order 的时候不重复保存

This commit is contained in:
tikkhun 2025-11-18 16:47:40 +08:00
parent 79b7e96175
commit 3b5e3ec906
1 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,6 @@ export class OrderService {
});
// 更新状态
await this.autoUpdateOrderStatus(siteId, order);
const orderId = (await this.saveOrder(siteId, orderData)).id;
const externalOrderId = order.id;
if (
existingOrder &&
@ -166,6 +165,8 @@ export class OrderService {
if (existingOrder && !existingOrder.is_editable && !forceUpdate) {
return;
}
const orderRecord = await this.saveOrder(siteId, orderData);
const orderId = orderRecord.id;
await this.saveOrderItems({
siteId,
orderId,