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:
2026-09-19 11:46:01 +08:00
parent 0d617d88c9
commit 32e76b440f
8 changed files with 16 additions and 47 deletions
+1 -4
View File
@@ -42,7 +42,6 @@ final class LedgerQuery {
$entry_table = \AKSRT\Core\DBMigrator::table('asset_entry');
$transaction_table = \AKSRT\Core\DBMigrator::table('asset_transaction');
$flow_table = \AKSRT\Core\DBMigrator::table('financial_flow');
$where = ['1=1'];
$params = [];
if ($user_id > 0) {
@@ -108,10 +107,9 @@ final class LedgerQuery {
$entry_params[] = $asset;
}
$rows = $wpdb->get_results($wpdb->prepare(
"SELECT e.*, t.operation_key, t.reason, t.ref_type, t.ref_key, t.actor_user_id, t.metadata, t.created_at transaction_created_at, f.withdrawal_number
"SELECT e.*, t.operation_key, t.reason, t.ref_type, t.ref_key, t.actor_user_id, t.metadata, t.created_at transaction_created_at
FROM {$entry_table} e
INNER JOIN {$transaction_table} t ON t.id = e.transaction_id
LEFT JOIN {$flow_table} f ON f.ledger_transaction_id = t.id
WHERE " . implode(' AND ', $entry_where) . ' ORDER BY e.transaction_id DESC, e.line_no ASC',
$entry_params
), ARRAY_A);
@@ -126,7 +124,6 @@ final class LedgerQuery {
'reason' => (string) $row['reason'],
'ref_type' => (string) ($row['ref_type'] ?? ''),
'ref_key' => (string) ($row['ref_key'] ?? ''),
'withdrawal_number' => (string) ($row['withdrawal_number'] ?? ''),
'actor_user_id' => (int) ($row['actor_user_id'] ?? 0),
'metadata' => json_decode((string) ($row['metadata'] ?? ''), true) ?: [],
'created_at' => (string) $row['transaction_created_at'],