forked from yoone/API
chore: 但存在 order 的时候不重复保存
This commit is contained in:
parent
79b7e96175
commit
3b5e3ec906
|
|
@ -153,7 +153,6 @@ export class OrderService {
|
||||||
});
|
});
|
||||||
// 更新状态
|
// 更新状态
|
||||||
await this.autoUpdateOrderStatus(siteId, order);
|
await this.autoUpdateOrderStatus(siteId, order);
|
||||||
const orderId = (await this.saveOrder(siteId, orderData)).id;
|
|
||||||
const externalOrderId = order.id;
|
const externalOrderId = order.id;
|
||||||
if (
|
if (
|
||||||
existingOrder &&
|
existingOrder &&
|
||||||
|
|
@ -166,6 +165,8 @@ export class OrderService {
|
||||||
if (existingOrder && !existingOrder.is_editable && !forceUpdate) {
|
if (existingOrder && !existingOrder.is_editable && !forceUpdate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const orderRecord = await this.saveOrder(siteId, orderData);
|
||||||
|
const orderId = orderRecord.id;
|
||||||
await this.saveOrderItems({
|
await this.saveOrderItems({
|
||||||
siteId,
|
siteId,
|
||||||
orderId,
|
orderId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue