城市合伙人端的修改(后台)
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user