修复财务支付记录展示
This commit is contained in:
@@ -112,6 +112,25 @@ assertIncludes(
|
||||
'钱包关系必须提供按归属类型生成的可读摘要',
|
||||
);
|
||||
|
||||
// 财务支付记录必须使用本领域的支付状态与渠道,不得复用支付订单状态。
|
||||
const financePaymentDefinition = resources.match(
|
||||
/define\('fin_payment',[\s\S]*?\n\s*\]\),/,
|
||||
)?.[0];
|
||||
if (!financePaymentDefinition) throw new Error('无法读取财务支付记录资源定义');
|
||||
for (const contract of [
|
||||
"relation('ec_order_identity', '/ec_order'",
|
||||
"listRelationNameOnly: true",
|
||||
"f('product_summary', { emptyText: '商品信息缺失' })",
|
||||
"{ label: '已支付', value: 35 }",
|
||||
"{ label: '余额支付', value: 'wallet' }",
|
||||
"{ label: '支付宝', value: 'alipay' }",
|
||||
"{ label: '微信支付', value: 'wechat' }",
|
||||
]) {
|
||||
if (!financePaymentDefinition.includes(contract)) {
|
||||
throw new Error(`财务支付记录缺少中文展示契约:${contract}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 购物车关联列必须展示用户和商品名称,UUID仅作为复制与排障信息保留。
|
||||
const cartDefinition = resources.match(
|
||||
/define\('ec_cart',[\s\S]*?\n\s*\]\),/,
|
||||
|
||||
Reference in New Issue
Block a user