@@ -191,28 +191,18 @@ export class StorePackageService {
|
||||
where: { id: storeId },
|
||||
select: { name: true, cityName: true },
|
||||
});
|
||||
const now = new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' });
|
||||
const submitterLabel = submitterType === 'PARTNER' ? '合伙人' : '门店';
|
||||
void this.wecomPush
|
||||
.dispatchMarkdown(
|
||||
'store.package_audit_pending',
|
||||
[
|
||||
'**套餐变更待审核**',
|
||||
`门店:${store?.name ?? storeId}`,
|
||||
store?.cityName ? `城市:${store.cityName}` : null,
|
||||
`提交端:${submitterLabel}`,
|
||||
`套餐条数:${packages.length}`,
|
||||
`时间:${now}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join('\n'),
|
||||
{ applyMention: false },
|
||||
)
|
||||
.catch((e) =>
|
||||
this.logger.warn(
|
||||
`store.package_audit_pending wecom push failed: ${e instanceof Error ? e.message : String(e)}`,
|
||||
),
|
||||
);
|
||||
void this.wecomPush.dispatchEvent(
|
||||
'store.package_audit_pending',
|
||||
{
|
||||
storeName: store?.name ?? String(storeId),
|
||||
cityName: store?.cityName || '—',
|
||||
submitter: submitterLabel,
|
||||
packageCount: String(packages.length),
|
||||
requestId: req.id.toString(),
|
||||
},
|
||||
{ handlePath: `/store-package-audits?requestId=${req.id.toString()}` },
|
||||
);
|
||||
|
||||
return serializeBigInt({
|
||||
id: req.id.toString(),
|
||||
|
||||
Reference in New Issue
Block a user