修复提现详情关联名称展示
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 功能描述:校验平台48类资源均具备中文展示字段,并防止列表、详情退回数据库ID或动态英文列。
|
||||
* 版本:v1.2.1
|
||||
* 版本:v1.3.0
|
||||
*/
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
@@ -79,6 +79,39 @@ for (const [key, label] of [
|
||||
}
|
||||
}
|
||||
|
||||
// 提现详情必须展示可读钱包摘要和审核人姓名,UUID仅作为复制信息保留。
|
||||
const withdrawalDefinition = resources.match(
|
||||
/define\('wallet_apply_cash',[\s\S]*?\n\s*\], 'list',/,
|
||||
)?.[0];
|
||||
if (!withdrawalDefinition) throw new Error('无法读取提现记录资源定义');
|
||||
for (const contract of [
|
||||
"relation('wallet_basic_identity', '/wallet_basic'",
|
||||
"relationOptionDisplay: 'wallet-owner'",
|
||||
"relation('reviewer_identity', '/platform_account'",
|
||||
"listDisplayKey: 'reviewer_name'",
|
||||
'listDisplayIdentityCopy: true',
|
||||
"detailDisplayKey: 'reviewer_name'",
|
||||
]) {
|
||||
if (!withdrawalDefinition.includes(contract)) {
|
||||
throw new Error(`提现详情缺少可读关系展示契约:${contract}`);
|
||||
}
|
||||
}
|
||||
assertIncludes(
|
||||
detailContract,
|
||||
"wallet_apply_cash: {",
|
||||
'提现详情必须声明专属字段顺序与审核姓名快照隐藏规则',
|
||||
);
|
||||
assertIncludes(
|
||||
detailContract,
|
||||
"hiddenKeys: ['reviewer_name']",
|
||||
'提现详情不得重复展示审核人姓名快照和审核人唯一标识',
|
||||
);
|
||||
assertIncludes(
|
||||
display,
|
||||
"field.relationOptionDisplay === 'wallet-owner'",
|
||||
'钱包关系必须提供按归属类型生成的可读摘要',
|
||||
);
|
||||
|
||||
// 购物车关联列必须展示用户和商品名称,UUID仅作为复制与排障信息保留。
|
||||
const cartDefinition = resources.match(
|
||||
/define\('ec_cart',[\s\S]*?\n\s*\]\),/,
|
||||
|
||||
Reference in New Issue
Block a user