feat: enhance reconciliation job processing and reporting features

- Updated ReconcileItemIndexController to include admin user validation and improved transfer order handling.
- Refactored ReconcileJobStoreController to ensure date range handling is more precise with start and end of day adjustments.
- Enhanced various report controllers to include currency code in responses for better financial clarity.
- Introduced new methods in AdminReconcileJobService for wallet transfer job creation and improved item scanning logic.
- Added wallet lookup idempotent path configuration for integration services to enhance API interactions.
This commit is contained in:
2026-06-16 13:50:55 +08:00
parent 606ed6817e
commit 1e7b2b31ee
21 changed files with 886 additions and 71 deletions

View File

@@ -30,6 +30,8 @@ final class AdminReportDailyProfitController extends Controller
$scope,
);
return AdminApiList::json($paginator, static fn (array $row): array => $row);
return AdminApiList::jsonWith($paginator, static fn (array $row): array => $row, [
'currency_code' => $service->resolvePeriodCurrencyCode($range['date_from'], $range['date_to'], $scope),
]);
}
}

View File

@@ -32,7 +32,7 @@ final class AdminReportPlayDimensionController extends Controller
$scope,
);
return AdminApiList::json($paginator, static function (object $row): array {
return AdminApiList::jsonWith($paginator, static function (object $row): array {
return [
'play_code' => (string) $row->play_code,
'dimension' => (int) $row->dimension,
@@ -40,6 +40,8 @@ final class AdminReportPlayDimensionController extends Controller
'total_payout_minor' => (int) $row->total_payout_minor,
'approx_house_gross_minor' => (int) $row->approx_house_gross_minor,
];
});
}, [
'currency_code' => $service->resolvePeriodCurrencyCode($range['date_from'], $range['date_to'], $scope),
]);
}
}

View File

@@ -32,7 +32,7 @@ final class AdminReportPlayerWinLossController extends Controller
$scope,
);
return AdminApiList::json($paginator, static function (object $row): array {
return AdminApiList::jsonWith($paginator, static function (object $row): array {
return [
'player_id' => (int) $row->player_id,
'agent_node_id' => isset($row->agent_node_id) ? (int) $row->agent_node_id : null,
@@ -43,6 +43,8 @@ final class AdminReportPlayerWinLossController extends Controller
'total_payout_minor' => (int) $row->total_payout_minor,
'net_win_loss_minor' => (int) $row->net_win_loss_minor,
];
});
}, [
'currency_code' => $service->resolvePeriodCurrencyCode($range['date_from'], $range['date_to'], $scope),
]);
}
}

View File

@@ -32,21 +32,16 @@ final class AdminReportRebateCommissionController extends Controller
$scope,
);
$response = AdminApiList::json($paginator, static function (object $row): array {
return AdminApiList::jsonWith($paginator, static function (object $row): array {
return [
'play_code' => (string) $row->play_code,
'total_rebate_minor' => (int) $row->total_rebate_minor,
'order_count' => (int) $row->order_count,
'ticket_item_count' => (int) $row->ticket_item_count,
];
});
$payload = $response->getData(true);
if (is_array($payload)) {
$payload['disclaimer'] = 'wallet_instant_rebate_not_agent_period_settlement';
$response->setData($payload);
}
return $response;
}, [
'currency_code' => $service->resolvePeriodCurrencyCode($range['date_from'], $range['date_to'], $scope),
'disclaimer' => 'wallet_instant_rebate_not_agent_period_settlement',
]);
}
}