feat: 增强代理结算和账单管理功能

- 在多个控制器中引入 SettlementPartyEnrichment 服务,以优化代理结算和账单的处理逻辑。
- 更新 AgentSettlementBillIndexController 和 AgentSettlementBillShowController,支持根据账单 ID 和关键字进行查询。
- 在 AgentSettlementPeriodCloseController 中添加对站点管理权限的验证,确保只有具备相应权限的管理员能够关闭账期。
- 在 AgentSettlementPeriodIndexController 中更新账期数据的返回格式,提升数据的完整性和可用性。
- 引入对相对占成比例的支持,增强代理资料的管理能力,确保数据一致性。
This commit is contained in:
2026-06-05 18:00:56 +08:00
parent a44679665d
commit 2d32f006c5
63 changed files with 4893 additions and 288 deletions

View File

@@ -66,11 +66,20 @@ final class AdminSettlementBatchIndexController extends Controller
'paid_at' => $b->paid_at?->toIso8601String(),
'total_ticket_count' => (int) $b->total_ticket_count,
'total_win_count' => (int) $b->total_win_count,
// 历史字段:保留兼容,实际单位为 minor。
'total_bet_amount' => $financial['total_bet_amount'],
'total_bet_amount_minor' => $financial['total_bet_amount_minor'],
// 历史字段:保留兼容,实际单位为 minor。
'total_actual_deduct' => $financial['total_actual_deduct'],
'total_actual_deduct_minor' => $financial['total_actual_deduct_minor'],
// settlement_batches 表内派彩金额一直按 minor 存储。
'total_payout_amount' => (int) $b->total_payout_amount,
'total_payout_amount_minor' => (int) $b->total_payout_amount,
'total_jackpot_payout_amount' => (int) $b->total_jackpot_payout_amount,
'total_jackpot_payout_amount_minor' => (int) $b->total_jackpot_payout_amount,
// 历史字段:保留兼容,实际单位为 minor。
'platform_profit' => $financial['platform_profit'],
'platform_profit_minor' => $financial['platform_profit_minor'],
'started_at' => $b->started_at?->toIso8601String(),
'finished_at' => $b->finished_at?->toIso8601String(),
'created_at' => $b->created_at?->toIso8601String(),