v3.5.11企业微信通知调整
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-08-26 09:55:19 +08:00
parent 632539e8dc
commit 3afbdfe6b9
17 changed files with 775 additions and 83 deletions
@@ -20,6 +20,8 @@ import type {
} from './dto/admin-mutate.dto';
import { TestWhitelistService } from '../../common/test-whitelist/test-whitelist.service';
import { HqPermissionsResolver, hqStoreCityWhere, mergeHqStoreCityWhere, type HqCityScope } from '../../common/guards/hq-permission.guard';
import { WecomMessagePushService } from '../../integrations/wecom/wecom-message-push.service';
import { formatHqWecomLabel, formatPartnerWecomLabel } from '../store/wecom-submitter-label';
/** 选填文案:空 / null / "null" 一律存库为 null,避免 String(null)==="null" */
function normalizeStoreOptionalText(value: unknown): string | null {
@@ -56,6 +58,7 @@ export class AdminStoresService {
private readonly analyticsService: AnalyticsService,
private readonly testWhitelist: TestWhitelistService,
private readonly hqPermissions: HqPermissionsResolver,
private readonly wecomPush: WecomMessagePushService,
) {}
private async storeIdsInScope(scope: HqCityScope): Promise<bigint[] | null> {
@@ -776,6 +779,23 @@ export class AdminStoresService {
});
}
const [submitter, partnerLabel] = await Promise.all([
formatHqWecomLabel(this.prisma, actorId),
formatPartnerWecomLabel(this.prisma, partnerAccountId),
]);
void this.wecomPush.dispatchEvent(
'store.audit_pending',
{
storeName: store.name,
cityName: store.cityName,
submitter,
partnerLabel,
action: '新建',
storeId: store.id.toString(),
},
{ handlePath: `/stores?storeId=${store.id.toString()}` },
);
return this.detailStore(store.id, actorId);
}