城市合伙人端的修改(后台)

This commit is contained in:
2026-07-12 10:19:39 +08:00
parent d0f0fa09af
commit 7f031cc4c2
74 changed files with 5430 additions and 975 deletions
@@ -213,11 +213,23 @@ export class AdminWechatBindingsService {
const accounts = await this.prisma.partnerAccount.findMany({
where,
include: { partner: { select: { id: true, companyName: true } } },
select: {
id: true,
phone: true,
name: true,
wxOpenId: true,
wxUnionId: true,
lastLoginAt: true,
status: true,
isPrimary: true,
parentAccountId: true,
companyName: true,
},
});
for (const a of accounts) {
if (!a.wxOpenId) continue;
const refId = a.isPrimary === 1 ? a.id : (a.parentAccountId ?? a.id);
rows.push({
actorType: 'PARTNER',
actorId: a.id,
@@ -225,8 +237,8 @@ export class AdminWechatBindingsService {
name: a.name,
wxOpenId: a.wxOpenId,
wxUnionId: a.wxUnionId,
refId: a.partnerId,
refLabel: a.partner.companyName,
refId,
refLabel: a.companyName,
lastLoginAt: a.lastLoginAt,
status: a.status,
});