feat: enhance admin role management and reconciliation features

- Updated AGENTS.md to clarify site admin roles and their associated permissions.
- Refactored reconciliation controllers to include admin user validation and improved access control based on admin roles.
- Enhanced AdminReconcileJobService to support player-specific reconciliation and site-based job creation.
- Removed deprecated rebate commission report functionality from the API and related services.
- Improved dashboard overview builders to accommodate new site operator roles and their specific functionalities.
This commit is contained in:
2026-06-16 16:04:01 +08:00
parent 3a59cc3f42
commit 4e370a79dc
35 changed files with 1230 additions and 180 deletions

View File

@@ -4,19 +4,29 @@ namespace App\Support;
use App\Models\AdminRole;
/** 平台角色管理仅维护的两个内置系统角色。 */
/** 平台内置系统角色(超管 / 站点运营 / 代理)。 */
final class PlatformSystemRoles
{
public const SLUG_SUPER_ADMIN = AdminRole::ROLE_SUPER_ADMIN;
public const SLUG_AGENT = 'agent';
public const SLUG_SITE_ADMIN = SitePlatformRole::SLUG;
public const SLUG_SITE_ADMIN = SiteOperatorRoles::SLUG_SITE_ADMIN;
public const SLUG_SITE_FINANCE = SiteOperatorRoles::SLUG_SITE_FINANCE;
public const SLUG_SITE_CS = SiteOperatorRoles::SLUG_SITE_CS;
/** @return list<string> */
public static function fixedSlugs(): array
{
return [self::SLUG_SUPER_ADMIN, self::SLUG_SITE_ADMIN, self::SLUG_AGENT];
return [
self::SLUG_SUPER_ADMIN,
self::SLUG_SITE_ADMIN,
self::SLUG_SITE_FINANCE,
self::SLUG_SITE_CS,
self::SLUG_AGENT,
];
}
public static function isFixedSlug(string $slug): bool
@@ -52,6 +62,8 @@ final class PlatformSystemRoles
{
self::ensureSuperAdminRole();
SiteAdminDefaultRolePermissions::ensurePlatformSiteAdminRole();
SiteFinanceDefaultRolePermissions::ensurePlatformSiteFinanceRole();
SiteCsDefaultRolePermissions::ensurePlatformSiteCsRole();
AgentDefaultRolePermissions::ensurePlatformAgentRole();
}
}