fix(frontend): 用户中心余额与积分记录不再拼接括号内容
记录行只保留中文变动原因、时间与变动额,移除名称后的(引用键/备注/提现单号)拼接。 同步清理该改动产生的死代码:$record_note 计算块、.uc-transactions__remark 样式、LedgerQuery 中已无消费者的 financial_flow LEFT JOIN 与 withdrawal_number 字段,以及 credits-wallet.php 里恒为 true 的 $skip_wallet_ledger 双路分支。
This commit is contained in:
@@ -63,19 +63,18 @@ test('native and front-end surfaces expose immutable business numbers', () => {
|
||||
assert.match(read('assets/js/order-center.js'), /\["流水号", order\.order_number\]/)
|
||||
assert.doesNotMatch(read('assets/js/order-center.js'), /flow_number|账本流水号/)
|
||||
assert.doesNotMatch(read('src/Payment/UserOrders.php'), /\$view\['flow_number'\]/)
|
||||
assert.match(read('inc/helpers/user-center-renderers/credits-wallet-ledger.php'), /withdrawal_number/)
|
||||
})
|
||||
|
||||
test('balance history renders withdrawal numbers from the committed flow', () => {
|
||||
test('ledger history carries no financial flow coupling', () => {
|
||||
const query = read('src/Ledger/LedgerQuery.php')
|
||||
const profile = read('inc/helpers/user-center-renderers/credits-wallet-ledger.php')
|
||||
const wallet = read('inc/helpers/user-center-renderers/credits-wallet.php') + read('inc/helpers/user-center-renderers/credits-wallet-ledger.php')
|
||||
assert.match(query, /LEFT JOIN \{\$flow_table\} f ON f\.ledger_transaction_id = t\.id/)
|
||||
assert.match(query, /'withdrawal_number'\s*=>\s*\(string\)/)
|
||||
for (const source of [profile, wallet]) {
|
||||
assert.match(source, /\['withdraw_hold', 'withdraw_refund'\]/)
|
||||
assert.match(source, /\$row\['withdrawal_number'\]/)
|
||||
}
|
||||
const records = [
|
||||
read('inc/helpers/user-center-renderers/credits-transactions.php'),
|
||||
read('inc/helpers/user-center-renderers/credits-wallet-ledger.php'),
|
||||
].join('\n')
|
||||
// 前台余额/积分记录只展示中文变动原因与变动额:提现单号既不查询也不下发,
|
||||
// 账本历史不再为了它 LEFT JOIN financial_flow。
|
||||
assert.doesNotMatch(query, /financial_flow|withdrawal_number/)
|
||||
assert.doesNotMatch(records, /\$row\['ref_key'\]|\$row\['remark'\]|withdrawal_number|uc-transactions__remark/)
|
||||
})
|
||||
|
||||
test('user withdrawal history uses one paginated ten-item endpoint', () => {
|
||||
|
||||
Reference in New Issue
Block a user