feat: 增强玩家 API,新增 locale 和时间字段,更新钱包 API 以支持可用余额计算,添加错误码与多语言支持
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user