feat(wecom): 结算账单明细与成交播报用户明文
支付/核销补 HQ 备注且手机号不脱敏;结算通知按城市、合伙人、笔数和累计金额分块推送。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
WECOM_PUSH_CONDITION_LABELS,
|
||||
WECOM_PUSH_DEFAULT_SETTLEMENT_CONDITIONS,
|
||||
WECOM_SETTLEMENT_PUSH_NAME,
|
||||
WECOM_TEMPLATE_PLACEHOLDERS,
|
||||
parseWecomPushConditions,
|
||||
} from './wecom-message-push';
|
||||
|
||||
@@ -33,4 +34,22 @@ describe('wecom-message-push', () => {
|
||||
'finance.store_bill',
|
||||
]);
|
||||
});
|
||||
|
||||
it('支付与核销模板含昵称、明文手机、备注占位符', () => {
|
||||
expect(WECOM_TEMPLATE_PLACEHOLDERS['order.paid']).toEqual(
|
||||
expect.arrayContaining(['userName', 'userPhone', 'userRemark']),
|
||||
);
|
||||
expect(WECOM_TEMPLATE_PLACEHOLDERS['redeem.success']).toEqual(
|
||||
expect.arrayContaining(['userName', 'userPhone', 'userRemark']),
|
||||
);
|
||||
});
|
||||
|
||||
it('结算账单模板含累计金额与明细摘要', () => {
|
||||
expect(WECOM_TEMPLATE_PLACEHOLDERS['finance.store_bill']).toEqual(
|
||||
expect.arrayContaining(['billCount', 'totalAmount', 'billSummary']),
|
||||
);
|
||||
expect(WECOM_TEMPLATE_PLACEHOLDERS['store.withdraw_approved']).toEqual(
|
||||
expect.arrayContaining(['cityName', 'partnerLabel', 'payee', 'accountNo', 'bankBranch']),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -197,6 +197,9 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'skuSummary',
|
||||
'deliveryLabel',
|
||||
'receiverInfo',
|
||||
'userName',
|
||||
'userPhone',
|
||||
'userRemark',
|
||||
'phoneMasked',
|
||||
'time',
|
||||
'handleUrl',
|
||||
@@ -209,6 +212,7 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'channel',
|
||||
'userName',
|
||||
'userPhone',
|
||||
'userRemark',
|
||||
'time',
|
||||
'handleUrl',
|
||||
'handleLabel',
|
||||
@@ -255,9 +259,14 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'storeId',
|
||||
],
|
||||
'store.withdraw_approved': [
|
||||
'cityName',
|
||||
'storeName',
|
||||
'partnerLabel',
|
||||
'withdrawNo',
|
||||
'amount',
|
||||
'payee',
|
||||
'accountNo',
|
||||
'bankBranch',
|
||||
'bankAccount',
|
||||
'time',
|
||||
'handleUrl',
|
||||
@@ -277,6 +286,7 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'finance.store_bill': [
|
||||
'period',
|
||||
'billCount',
|
||||
'totalAmount',
|
||||
'billSummary',
|
||||
'time',
|
||||
'handleUrl',
|
||||
@@ -285,6 +295,7 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'finance.partner_bill': [
|
||||
'period',
|
||||
'billCount',
|
||||
'totalAmount',
|
||||
'billSummary',
|
||||
'time',
|
||||
'handleUrl',
|
||||
@@ -292,8 +303,17 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
],
|
||||
'finance.winery_bill': [
|
||||
'period',
|
||||
'amount',
|
||||
'billCount',
|
||||
'totalAmount',
|
||||
'cityNames',
|
||||
'partnerNames',
|
||||
'orderCount',
|
||||
'orderAmount',
|
||||
'rate',
|
||||
'amount',
|
||||
'payee',
|
||||
'accountNo',
|
||||
'bankBranch',
|
||||
'bankAccount',
|
||||
'time',
|
||||
'handleUrl',
|
||||
@@ -302,6 +322,7 @@ export const WECOM_TEMPLATE_PLACEHOLDERS: Record<WecomTemplateEventKey, string[]
|
||||
'finance.logistics_bill': [
|
||||
'period',
|
||||
'billCount',
|
||||
'totalAmount',
|
||||
'billSummary',
|
||||
'time',
|
||||
'handleUrl',
|
||||
|
||||
Reference in New Issue
Block a user