fix:提交修改信息

This commit is contained in:
2026-07-01 17:58:01 +08:00
parent d6855c9f5c
commit a0ee3a21cd
9 changed files with 215 additions and 46 deletions
@@ -115,13 +115,24 @@ export class StoreService {
async partnerDashboard(partnerAccountId: bigint) {
const account = await this.getPartnerAccount(partnerAccountId);
const [storeCount, orderCount] = await Promise.all([
const [storeCount, orderCount, recentStores] = await Promise.all([
this.prisma.store.count({ where: { partnerId: account.partnerId } }),
this.prisma.order.count({
where: { city: { partnerId: account.partnerId } },
}),
this.prisma.store.findMany({
where: { partnerId: account.partnerId },
select: { id: true, name: true, status: true, createdAt: true },
orderBy: { createdAt: 'desc' },
take: 10,
}),
]);
return { storeCount, orderCount, companyName: account.partner.companyName };
return {
storeCount,
orderCount,
companyName: account.partner.companyName,
recentStores: serializeBigInt(recentStores),
};
}
private async getPartnerAccount(partnerAccountId: bigint) {