fix(M09-REGRESSION): 完成商品逐单对账与权限收口
This commit is contained in:
+47
-1
@@ -43,7 +43,8 @@ export interface ProductOrder {
|
||||
itemCount: number; totalQuantity: number; totalAmountCents: number;
|
||||
paidAmountCents: number; refundedAmountCents: number; note: string;
|
||||
inventoryStatus: string; createdAt: string; updatedAt: string;
|
||||
items?: ProductOrderItem[];
|
||||
items?: ProductOrderItem[]; payments?: ProductPayment[];
|
||||
refunds?: ProductRefund[]; events?: ProductOrderEvent[];
|
||||
}
|
||||
|
||||
export interface ProductOrderItem {
|
||||
@@ -51,6 +52,51 @@ export interface ProductOrderItem {
|
||||
unitPriceCents: number; subtotalCents: number; note?: string;
|
||||
}
|
||||
|
||||
export interface ProductPayment {
|
||||
id: string; paymentNo: string; provider: string; channel: string; status: string;
|
||||
amountCents: number; refundedAmountCents: number;
|
||||
expiresAt: string; paidAt: string | null; createdAt: string;
|
||||
}
|
||||
|
||||
export interface ProductRefund {
|
||||
id: string; paymentId: string; refundNo: string; provider: string; status: string;
|
||||
amountCents: number; reason: string; inventoryDisposition: string;
|
||||
inventoryStatus: string; completedAt: string | null; createdAt: string;
|
||||
}
|
||||
|
||||
export interface ProductOrderEvent {
|
||||
id: string; fromStatus: string | null; toStatus: string; action: string;
|
||||
actorType: string; actorId: string | null; versionAfter: number;
|
||||
reason: string; createdAt: string;
|
||||
}
|
||||
|
||||
export interface ProductOrderReconciliation {
|
||||
order: { id: string; orderNo: string; status: string; inventoryStatus: string };
|
||||
amounts: {
|
||||
orderAmountCents: number; itemAmountCents: number;
|
||||
paidAmountCents: number; capturedAmountCents: number;
|
||||
refundedAmountCents: number; paymentRefundedCents: number;
|
||||
succeededRefundCents: number; netRevenueCents: number;
|
||||
};
|
||||
inventory: {
|
||||
status: string; reservationBalance: number; saleBalance: number;
|
||||
ledger: Array<{
|
||||
id: string; inventoryId: string; skuId: string; productName: string; skuName: string;
|
||||
requestId: string; operation: string; availableDelta: number; lockedDelta: number;
|
||||
lossDelta: number; reservationDelta: number; saleDelta: number;
|
||||
availableAfter: number; lockedAfter: number; lossAfter: number;
|
||||
versionAfter: number; createdAt: string;
|
||||
}>;
|
||||
};
|
||||
storages: Array<{
|
||||
id: string; storageNo: string; status: string; recordTotalQuantity: number;
|
||||
recordRemainingQuantity: number; itemTotalQuantity: number;
|
||||
itemRemainingQuantity: number; itemCount: number; consistent: boolean;
|
||||
}>;
|
||||
checks: Array<{ key: string; passed: boolean; expected: number; actual: number }>;
|
||||
consistent: boolean;
|
||||
}
|
||||
|
||||
export interface ProductStorage {
|
||||
id: string; storeId: string; memberId: string; sourceOrderId: string | null;
|
||||
storageNo: string; sourceType: 'ORDER' | 'MANUAL'; status: string;
|
||||
|
||||
Reference in New Issue
Block a user