feat: 增强玩家 API,新增 locale 和时间字段,更新钱包 API 以支持可用余额计算,添加错误码与多语言支持

This commit is contained in:
2026-05-09 15:05:46 +08:00
parent f1b38ef421
commit a0f86a4e36
36 changed files with 2523 additions and 34 deletions

View File

@@ -4,6 +4,9 @@ namespace App\Providers;
use App\Models\AdminUser;
use App\Models\Player;
use App\Services\Wallet\HttpMainSiteWalletGateway;
use App\Services\Wallet\MainSiteWalletGateway;
use App\Services\Wallet\StubMainSiteWalletGateway;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
@@ -16,7 +19,14 @@ class AppServiceProvider extends ServiceProvider
*/
public function register(): void
{
//
$this->app->singleton(MainSiteWalletGateway::class, function (): MainSiteWalletGateway {
$url = config('lottery.main_site.wallet_api_url');
if (! is_string($url) || trim($url) === '') {
return new StubMainSiteWalletGateway;
}
return new HttpMainSiteWalletGateway;
});
}
/**