v3.5.6版本迭代
CI / verify (pull_request) Waiting to run

This commit is contained in:
2026-08-23 16:41:22 +08:00
parent 608e3e5ec5
commit 7e12eb3ca6
33 changed files with 1537 additions and 278 deletions
@@ -2,6 +2,7 @@ import { Injectable, NotFoundException } from '@nestjs/common';
import type { DeliveryProvider } from '@prisma/client';
import { Prisma } from '@prisma/client';
import { PrismaService } from '../../common/prisma/prisma.module';
import { loadStorePrimaryBank } from '../../common/store/store-bank.util';
import { serializeBigInt } from '../../common/decorators/current-user.decorator';
import type { AdminDeliveriesQueryDto, AdminRedeemRecordsQueryDto } from './dto/admin-query.dto';
import type { UpdateDeliveryDto } from './dto/admin-mutate.dto';
@@ -113,8 +114,13 @@ export class AdminRedeemService {
},
});
if (!record) throw new NotFoundException('核销记录不存在');
const primaryAccount = await loadStorePrimaryBank(this.prisma, record.storeId);
return serializeBigInt({
...record,
store: {
...record.store,
primaryAccount,
},
allocations: record.allocations.map((a) => ({
couponId: a.couponId,
amount: Number(a.amount),