Commit Graph

130 Commits

Author SHA1 Message Date
9d355aa853 fix(ticket): 本地化调整工单时间线状态标签翻译
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 将工单时间线中的状态标签改为调用多语言翻译接口
- 新增多语言文件中对应时间线标签的翻译词条
- 统一使用请求中的本地语言环境渲染时间线标签
- 优化代理信用额度校验,抽取公共方法requireProfile
- 抛出更精确的校验异常信息,区分缺失和额度超出情况
2026-07-02 14:39:55 +08:00
c7fd38bb08 chore(lang-ne): 新增尼泊尔语管理与验证消息
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 新增管理后台及相关错误消息
- 定义尼泊尔语验证属性名称
- 新增业务层验证消息
- 创建自定义验证消息
- 新增特定开奖奖项槽位验证消息
- 新增各项验证规则的尼泊尔语翻译
2026-07-02 11:25:48 +08:00
992195b00c feat(agent-profile): 限制代理及玩家返点和分成范围,增强权限校验
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 添加ensureSuperAdmin方法,限制管理员设置操作权限
- 在AdminSettingController接口中新增权限检查,防止非超级管理员操作
- AdminPlayerIndexController新增direct agent筛选支持
- AdminPlayerUpdateController新增对信用玩家默认币别变更的拒绝逻辑
- 新增WalletSettlementBillsController,实现玩家信用盘账期账单摘要接口
- AgentProfileService调整,新增返点限额和分享比例自动下调机制,保持子代理及玩家配置不超父级
- AgentProfileService增加can_grant_extra_rebate权限继承限制,阻止无权限代理开启
- AgentSettlementPeriodCloseService增加玩家账单回水信用释放逻辑,确保信用额度同步
- PlayerCreditService新增释放账单回水对应信用逻辑,维护账期信用一致性
- TicketPlacementService和TicketPreviewService新增信用玩家投注币别匹配校验,防止币别不符
- PlayerLedgerLogsService优化信用额度计算,增加可用额度上下限限制,防止负值和超限
- 调整后台管理导航,仅超管可见设置入口,强化权限隔离
- 路由新增玩家信用账单查询接口
- 补充多项AgentProfile相关单元测试覆盖额度限制、返点继承、返点下调场景及权限限制
- 增加站点管理员登录测试,验证系统设置菜单不可见,提升用户权限体验
2026-07-01 15:35:46 +08:00
ed5a983003 feat(wallet): 增强资金流水和信用账本的公共类型过滤,支持游戏结算和账单结算
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
2026-06-30 17:55:16 +08:00
f1f68d09d3 feat(credit): 实时同步代理已用额度,覆盖玩家下注/结算全流程
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- PlayerCreditService 在下注占用、输赢结算、撤单释放等关键节点触发 AgentUsedCreditSyncService
- AgentProfileService::present 与 AgentDashboardOverviewBuilder 查询前主动同步 used_credit
- 确保代理链 used_credit(团队已用风险)实时反映下级玩家信用占用状态
2026-06-30 15:15:15 +08:00
200269196e feat(tests): 添加结算相关功能的测试用例,增强代码覆盖率
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
2026-06-30 11:41:49 +08:00
c83343e989 fix(settlement): 操作记录分页、流水动作与坏账幂等加固
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 新增 settlement-operations 合并列表 API,收付/调账接口改为标准分页
- actionable_only 流水在内存过滤后正确分页
- 已结账单流水不再展示补差/冲正快捷动作
- 坏账核销支持 idempotency_key 并写入 result_bill_id
- 补充操作记录、流水与坏账幂等相关测试
2026-06-26 16:40:46 +08:00
7ec8f4c5a2 fix(funds): 加固转账冲正、结算收付幂等与坏账核销
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 转入 main_site_timeout 等不可冲正场景直接拒绝,避免假结案
- payment_records / settlement_adjustments 增加 partial unique 索引
- 坏账核销行锁 + meta 幂等回放;补差单记录 result_bill_id
- 新增 FundOperationsHardeningTest 覆盖关键路径
2026-06-26 15:19:17 +08:00
3f04b4ebe3 feat(admin): 密码校验统一与后台 API/设置增强
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 管理端账号/代理/站点等密码最短长度统一为 6 位
- LotterySettings、审计日志展示、币种与报表接口等小修复
- 补充设置批量更新、注单、校验错误等相关测试
2026-06-26 14:39:22 +08:00
8d5ff0a7ae fix: correct recursive call in requireDefaultAdminSiteId and remove platform_only flag from settings navigation
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- Fixed infinite recursion bug in AdminUser::requireDefaultAdminSiteId() by calling defaultAdminSiteId() instead of itself
- Removed platform_only restriction from settings navigation to allow site-level access to reconciliation and rebate management features
2026-06-24 10:14:36 +08:00
3c57941895 feat: add idempotency support for settlement adjustments and payments, fix rebate handling
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- Added idempotency_key parameter to settlement bill adjustment and payment endpoints to prevent duplicate operations
- Fixed player rebate profile updates to preserve existing values when only one field is modified
- Moved wallet player validation earlier in AdminPlayerStoreController to prevent unnecessary processing
- Enhanced extra rebate calculation to include 'in_bill' and 'settled' statuses in AgentP
2026-06-23 16:49:57 +08:00
9a7522e928 chore(git): 添加.qoder到.gitignore中
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- 避免.qoder文件夹被版本控制跟踪
- 保持项目目录整洁
- 防止个人或临时文件泄露到仓库中
2026-06-22 11:29:48 +08:00
23ac672b0f feat: add platform risk summary to admin dashboard
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
- Introduced a new method to determine if platform risk should be included based on admin permissions and scope.
- Enhanced the dashboard output to include platform risk details when applicable, consolidating risk data for better visibility.
- Removed the deprecated platformRiskSummary method to streamline the codebase.
2026-06-22 10:51:06 +08:00
3f29229499 fix: 部分收付累计释额并扩展结算 E2E 与 CI
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled
账期收付改为按累计已付同步 credit_ledger,修复多笔 partial_paid 与坏账核销重复释额;新增 API E2E(占成、权限、部分收付/坏账)与 GitHub Actions e2e-api job。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 09:48:01 +08:00
6ec9634704 feat: 添加E2E测试环境配置支持
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
添加LOTTERY_E2E环境变量来控制E2E测试相关功能,
包括绕过验证码、登录限制和钱包API URL验证,
同时更新composer.json以包含E2E专用的提供者和服务。
2026-06-18 14:42:22 +08:00
6b2ea39ea1 fix: 修复并发竞态与幂等性缺陷并优化子树查询
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
- 扩大玩家ID随机数位宽降低碰撞概率
- 授信额度变更加 lockForUpdate 防并发下调
- 结算冲正与入账利用唯一索引实现幂等闸门
- 失败登录计数加锁防丢失
- 代理子树查询改用子查询替代全表 pluck
- 修复返点默认值百分比单位转换
- 测试中全量 fake 广播事件防 CI 500
2026-06-18 09:38:24 +08:00
2e0b257160 feat: enhance player authentication and agent management features
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
- Updated AGENTS.md to clarify player interface bindings and agent account restrictions.
- Improved PlayerAuthLoginController to include captcha verification for player login.
- Enhanced AdminPlayerIndexController with permission checks for admin users.
- Refactored AdminPlayerStoreController to enforce agent node restrictions for non-super admins.
- Introduced new error codes for player authentication failures and updated related services.
- Enhanced validation rules for agent profiles to include settlement cycle options.
- Improved AdminCaptchaService to support separate scopes for admin and player captcha handling.
- Updated various services to ensure proper credit management and settlement processes.
2026-06-17 15:27:00 +08:00
b496a9457c feat: enhance configuration and logging for admin services
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
- Updated .env.example to enable Redis Lua for lottery risk pool and added configuration for agent settlement.
- Improved AGENTS.md to clarify site operations and admin roles.
- Enhanced PHPUnit configuration with memory limit and cache directory settings.
- Refactored AdminReportQueryService and related services to utilize LimitedQuery for better data handling and truncation warnings.
- Added logging for draw settlement failures in DrawTickService.
- Introduced credit preflight checks and reverse bet hold functionality in PlayerCreditService.
- Improved risk pool management with new Redis lock handling in RiskPoolService and TicketPlacementService.
2026-06-16 17:08:10 +08:00
4e370a79dc 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.
2026-06-16 16:04:01 +08:00
3a59cc3f42 feat: enhance reporting and dashboard functionalities
- Updated AGENTS.md to clarify SSO wallet integration and error handling for account status.
- Refactored date handling in AdminReportQueryService and related classes to use precise date filtering for financial reports.
- Improved query logic in AdminDashboardSnapshotBuilder, AgentDashboardOverviewBuilder, and SiteDashboardOverviewBuilder to ensure accurate activity statistics based on business dates.
2026-06-16 14:18:56 +08:00
1e7b2b31ee 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.
2026-06-16 13:50:55 +08:00
606ed6817e feat: enhance risk pool management and role validation
- Updated AGENTS.md to streamline information on risk pool operations and agent account restrictions.
- Introduced filtering options in AdminRiskPoolIndexController for active risk pools.
- Refactored AdminRiskPoolLockLogIndexController to support grouping by ticket or entry.
- Enhanced AdminRoleStoreController and AdminRoleUpdateController to prevent the use of reserved slugs for new roles.
- Improved error messaging for role creation and updates to clarify reserved role restrictions.
- Added new API routes for ticket item retrieval to improve admin functionalities.
2026-06-15 17:21:53 +08:00
5b6d4cb74d feat: enhance agent management and validation logic
- Updated AGENTS.md to clarify agent account restrictions and permissions.
- Implemented checks in AgentNodeAdminUserStoreController and AgentNodeRoleStoreController to restrict admin user and role creation to the agent's own node.
- Enhanced validation in AdminPlayerStoreController and AdminPlayerUpdateController to enforce credit limit and rebate rate rules based on player funding mode.
- Refactored various request classes to utilize shared admin account field rules for consistency.
- Improved error handling in services related to credit allocation and rebate limits to ensure proper validation and messaging.
2026-06-14 21:13:27 +08:00
395e1c7400 feat: refactor super admin to use is_super_admin flag and enhance site deletion logic
- Changed super admin detection from role-based to `is_super_admin` flag in AdminUser model
- Added `requireDefaultAdminSiteId()` method to throw validation error when no integration site exists
- Enhanced site deletion to migrate platform role bindings to fallback site and auto-delete site-specific admin accounts
- Made agent line code optional with auto-generation fallback using `{site_code}-agent-{counter}` format
2026-06-12 20:47:40 +08:00
980f3c9593 feat: enhance agent settlement features and improve data access controls
- Added new section in AGENTS.md detailing learned workspace facts for better understanding of settlement processes.
- Updated AgentNodeDestroyController to remove unnecessary checks for admin users.
- Enhanced AgentSettlement controllers to assert permissions for finance adjustments and bill operations.
- Improved query scopes in AgentSettlement services to ensure proper data access based on admin roles.
- Refactored methods in SettlementPartyEnrichment for better bill row enrichment and data handling.
- Introduced new methods in AdminAgentSettlementScope for managing agent node visibility and finance adjustments.
2026-06-12 15:59:05 +08:00
e14b7b4569 feat: add AgentNodeIndexController for node listing and remove settlement_cycle field from AgentProfile logic 2026-06-11 18:01:58 +08:00
4d1c2b3d63 refactor: 调整返点字段为百分比格式并新增集成指南路由
- 将 rebate_limit 和 default_player_rebate 的校验范围从 0-1 改为 0-100
- 在服务层进行百分比与小数的转换(输入除以100,输出乘以100)
- 更新相关测试用例以匹配新的百分比格式
- 新增 admin/docs/integration-guide 路由用于集成文档展示
2026-06-11 09:23:16 +08:00
1d13d19b65 fix(database): 修复缺失表结构并完善索引检查逻辑
- 新增 fix-missing-tables.php 脚本用于补建 settlement_batches 和 system_jobs 表
- 为 settlement_batches 表添加 draw_id 和 settle_version 联合索引
- 在迁移文件中添加表存在性检查避免索引操作失败
- 补录相关迁移记录到 migrations 表中确保迁移状态一致
- 完善 schema 检查逻辑防止对不存在的表进行索引操作
2026-06-10 14:42:23 +08:00
c887c4e146 refactor: 将广播事件改为异步队列并增强索引检查兼容性 2026-06-10 13:58:16 +08:00
1948b10fe6 feat: 彩票业务迁移并补全后台权限与代理结算体系 2026-06-10 10:29:43 +08:00
bbdb69dabb feat: 添加统一数据库初始化命令,简化数据库迁移和种子填充流程;新增基础和演示数据填充器 2026-06-09 17:41:37 +08:00
5bd7517ce9 feat: 增强风险池 Redis 操作,添加 TTL 支持并更新相关 Lua 脚本;新增 API 异常响应测试 2026-06-09 17:06:05 +08:00
a0c3b8a1ff feat: 增强信用问题检查,动态调整检查项以适应数据库结构变化 2026-06-09 15:13:23 +08:00
6860c0cd6e 2026-06-09 15:09:53 +08:00
8b1d08d3b1 feat: 增强下注请求校验并调整后台钱包与接入站点权限 2026-06-09 15:06:43 +08:00
41b964a606 feat: 增强后台设置校验、代理权限控制与财务审计能力 2026-06-09 13:44:08 +08:00
8d5d7f5b17 feat: 切换 schema dump 基线并增强返点结算与管理校验 2026-06-08 17:41:41 +08:00
2d32f006c5 feat: 增强代理结算和账单管理功能
- 在多个控制器中引入 SettlementPartyEnrichment 服务,以优化代理结算和账单的处理逻辑。
- 更新 AgentSettlementBillIndexController 和 AgentSettlementBillShowController,支持根据账单 ID 和关键字进行查询。
- 在 AgentSettlementPeriodCloseController 中添加对站点管理权限的验证,确保只有具备相应权限的管理员能够关闭账期。
- 在 AgentSettlementPeriodIndexController 中更新账期数据的返回格式,提升数据的完整性和可用性。
- 引入对相对占成比例的支持,增强代理资料的管理能力,确保数据一致性。
2026-06-05 18:00:56 +08:00
a44679665d feat: 增强代理和玩家管理功能
- 在多个控制器中更新权限检查逻辑,确保管理员能够更灵活地管理代理和玩家。
- 在 AdminPlayerStoreController 中引入对玩家创建能力的验证,确保只有具备相应权限的管理员能够创建玩家。
- 更新请求验证逻辑,新增 credit_limit、rebate_rate 和 extra_rebate_rate 字段,以支持更细粒度的玩家管理。
- 在 AgentNodeProfileController 中添加对父代理能力授予的验证,确保子代理的权限在父代理范围内。
- 引入 AgentProfileFieldRules 以简化代理资料更新请求的规则定义,提升代码复用性。
2026-06-04 18:00:50 +08:00
96545f87f6 feat: 增强代理节点和代理资料管理功能
- 在 AgentNodeProfileController 中添加对父代理能力授予的验证,确保子代理的权限在父代理范围内。
- 更新多个请求类,统一代理资料字段的验证逻辑,提升代码复用性。
- 引入 AgentProfileFieldRules 以简化代理资料更新请求的规则定义。
- 在 AgentProfile 模型中设置主键为 agent_node_id,确保与代理节点的关联性。
- 更新错误信息,增加对授信额度和占成比例的验证,确保数据一致性。
2026-06-04 10:15:10 +08:00
e3ffffad9c feat: 增强代理和玩家管理功能
- 在 SyncAdminAuthorizationCommand 中新增对代理线路和结算菜单操作的同步功能,确保缺失的菜单操作行能够被创建。
- 更新多个控制器中的权限检查逻辑,使用 hasPermissionCode 替代原有的权限验证方式,提升权限管理的灵活性。
- 在 AdminPlayerStoreController 中引入对玩家创建能力的验证,确保只有具备相应权限的管理员能够创建玩家。
- 更新请求验证逻辑,新增 credit_limit、rebate_rate 和 extra_rebate_rate 字段,以支持更细粒度的玩家管理。
- 在 AdminUser 和 AgentNode 模型中增强角色与用户的权限管理功能,支持更细粒度的权限控制。
2026-06-04 09:17:47 +08:00
240d585f15 fix: 修复 ApiFormRequest 中 lottery_locale 属性的获取方式
- 将 lottery_locale 的获取方式从 request 属性更新为 attributes 属性,确保正确获取请求中的本地化设置。
2026-06-03 11:32:58 +08:00
0527c7c392 feat: 增强管理员权限与角色管理功能
- 在 SyncAdminAuthorizationCommand 中新增对代理和抽奖菜单操作的同步功能,确保缺失的菜单操作行能够被创建。
- 更新多个控制器中的权限检查逻辑,使用 hasPermissionCode 替代原有的权限验证方式,提升权限管理的灵活性。
- 引入 ApiMessage 统一错误响应格式,确保在权限不足时返回一致的错误信息。
- 更新 AdminRole 和 AdminUser 模型,增强角色与用户的权限管理功能,支持更细粒度的权限控制。
2026-06-03 10:56:36 +08:00
1dcd4716c5 refactor: 更新权限管理与请求验证逻辑
- 在多个控制器中将权限检查从 hasAdminPermission 更新为 hasPermissionCode,以增强权限管理的灵活性。
- 引入 AdminScopePolicy,优化基于代理节点的权限和数据过滤逻辑,确保管理员能够更精确地控制访问权限。
- 在请求验证中添加 agent_node_id 字段,确保 API 接口支持代理节点的相关操作。
- 更新 AdminUser 模型,新增 hasPermissionCode 方法,以支持更细粒度的权限检查。
- 优化审计日志记录逻辑,确保在处理请求时能够准确记录管理员的操作。
2026-06-03 10:07:38 +08:00
0841fbed32 feat: 增强管理员功能与数据处理
- 在多个控制器中引入 agent_node_id,以支持基于代理节点的权限和数据过滤。
- 更新 AdminRole 和 AdminUser 模型,新增角色范围和代理节点相关功能,提升角色管理的灵活性。
- 在请求验证中添加 agent_node_id 字段,确保 API 接口支持代理节点的相关操作。
- 优化 LotterySettings 服务,支持批量写入设置,提升配置管理的效率。
- 更新仪表板和报告服务,增强数据统计功能,确保管理员能够获取更全面的统计信息。
2026-06-02 14:36:58 +08:00
d5232c756f feat: 更新玩家信息和统计功能
- 在多个控制器中更新玩家相关数据的查询,新增 'nickname' 字段以增强玩家信息的完整性。
- 在 AdminDashboardSnapshotBuilder 中引入平台风险统计,提供锁定金额和使用百分比的概览。
- 更新 AdminReportQueryService 以返回更详细的统计数据,包括总投注、总中奖和总派彩金额。
- 增强测试用例以验证新增字段和统计功能的准确性。
2026-06-01 16:53:08 +08:00
c101ece539 feat: 添加待审核开奖批次统计功能至管理员仪表板
- 在 AdminDashboardSnapshotBuilder 中新增 resultBatchQueue 方法,统计全站待审核的开奖批次信息。
- 更新仪表板数据结构,包含待审核开奖批次的总数、待开奖次数及首个待审核开奖的 ID。
- 在 AdminDashboardApiTest 中新增测试用例,验证仪表板返回的待审核开奖批次统计数据的准确性。
2026-06-01 16:01:37 +08:00
b13776b480 feat: 添加删除待审核开奖批次功能及相关错误信息
- 在 AdminAuthorizationRegistry 中新增删除待审核开奖批次的权限定义。
- 更新 API 路由以支持删除待审核开奖批次的请求。
- 在多语言文件中添加相关错误信息,确保用户在删除操作中获得清晰的反馈。
- 增加测试用例,验证管理员能够成功删除待审核的开奖批次并返回正确状态。
2026-06-01 15:37:33 +08:00
e6cf94af46 refactor: 使用 ApiMessage 统一错误响应格式
- 在多个控制器中引入 ApiMessage,替换原有的 ApiResponse 错误处理逻辑,确保错误信息的一致性与可读性。
- 更新错误返回信息,使用更具语义的键值,提升 API 的可维护性与用户体验。
- 适配相关控制器的请求参数,确保在处理错误时能够正确返回相应的错误信息。
2026-06-01 14:23:48 +08:00
e547e2b4a6 feat: 添加货币组至设置控制器并更新测试用例
- 在 SettingIndexController 中新增 'currency' 组,以支持货币相关设置。
- 更新 PublicSettingsApiTest,新增测试用例以验证货币组的返回数据,确保 API 正确处理货币设置。
2026-06-01 13:38:08 +08:00