feat(ops): show order redeem records including FIFO secondary coupons
CI / verify (pull_request) Has been cancelled

Persist redeem allocations and surface them on HQ order detail with backfill for history.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-22 23:38:51 +08:00
parent f2303f7fb8
commit e0d3c840a2
5 changed files with 542 additions and 21 deletions
@@ -181,6 +181,13 @@ export class RedeemService {
storeId: account.storeId,
amount,
settleAmount,
allocations: {
create: normalizedAllocations.map((item, index) => ({
couponId: BigInt(item.couponId),
amount: item.amount,
sortOrder: index,
})),
},
},
});