refactor:拆分 API 路由与请求校验,统一 final 类和代码风格

This commit is contained in:
2026-05-13 11:54:40 +08:00
parent 5d2dbdbe1d
commit 805847954d
281 changed files with 1886 additions and 1308 deletions

View File

@@ -2,16 +2,16 @@
namespace App\Services\Admin;
use App\Lottery\DrawResultBatchStatus;
use App\Models\AdminUser;
use Carbon\Carbon;
use App\Models\Draw;
use App\Models\RiskPool;
use App\Models\SettlementBatch;
use App\Models\AdminUser;
use App\Models\TicketItem;
use App\Models\TicketOrder;
use App\Models\TransferOrder;
use App\Models\SettlementBatch;
use App\Lottery\DrawResultBatchStatus;
use App\Services\Draw\DrawHallSnapshotBuilder;
use Carbon\Carbon;
/**
* 后台首页仪表盘:聚合大厅快照、当期财务、期号面板、风控摘要、异常转账计数。

View File

@@ -2,14 +2,14 @@
namespace App\Services\Admin;
use App\Models\AdminUser;
use App\Models\ReconcileItem;
use App\Models\ReconcileJob;
use App\Services\AuditLogger;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\AdminUser;
use Illuminate\Support\Str;
use App\Models\ReconcileJob;
use Illuminate\Http\Request;
use App\Models\ReconcileItem;
use App\Services\AuditLogger;
use Illuminate\Support\Facades\DB;
/**
* 对账任务:落库 `reconcile_jobs` / `reconcile_items`(阶段 7;差异引擎可后续替换)。

View File

@@ -4,10 +4,10 @@ namespace App\Services\Admin;
use App\Models\AdminUser;
use App\Models\ReportJob;
use App\Services\AuditLogger;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Services\AuditLogger;
use Illuminate\Support\Facades\DB;
/**
* 报表导出任务:落库 `report_jobs`(阶段 7;异步生成可后续接队列)。

View File

@@ -2,13 +2,13 @@
namespace App\Services;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Cache;
/**
* 后台登录图形验证码SVG 产出 + Cache 短时保存答案摘要(单行文本,便于前台用 img[src=data:...] 展示)。
*/
class AdminCaptchaService
final class AdminCaptchaService
{
private const PREFIX = 'admin_captcha:';

View File

@@ -2,9 +2,9 @@
namespace App\Services;
use App\Models\AdminUser;
use App\Models\AuditLog;
use App\Models\Player;
use App\Models\AuditLog;
use App\Models\AdminUser;
use Illuminate\Http\Request;
/**

View File

@@ -2,16 +2,16 @@
namespace App\Services\Config;
use App\Lottery\ConfigVersionStatus;
use App\Models\Currency;
use App\Models\OddsItem;
use App\Models\OddsVersion;
use App\Models\PlayConfigItem;
use App\Models\PlayConfigVersion;
use App\Models\PlayType;
use App\Models\OddsVersion;
use App\Models\RiskCapItem;
use App\Models\PlayConfigItem;
use App\Models\RiskCapVersion;
use App\Models\PlayConfigVersion;
use Illuminate\Support\Collection;
use App\Lottery\ConfigVersionStatus;
/**
* 玩家端:当前生效的玩法目录 + 三套版本快照(只读)。

View File

@@ -2,17 +2,17 @@
namespace App\Services\Config;
use App\Lottery\ConfigVersionStatus;
use App\Models\AdminUser;
use App\Models\Currency;
use App\Models\OddsItem;
use App\Models\OddsVersion;
use App\Models\PlayType;
use App\Services\AuditLogger;
use App\Support\OddsStandardScopes;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use App\Models\AdminUser;
use App\Models\OddsVersion;
use Illuminate\Http\Request;
use App\Services\AuditLogger;
use Illuminate\Support\Facades\DB;
use App\Support\OddsStandardScopes;
use App\Lottery\ConfigVersionStatus;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/** 后台:赔率版本({@see odds_versions} / {@see odds_items} */
final class OddsStreamService

View File

@@ -2,15 +2,15 @@
namespace App\Services\Config;
use App\Lottery\ConfigVersionStatus;
use App\Models\PlayType;
use App\Models\AdminUser;
use Illuminate\Http\Request;
use App\Services\AuditLogger;
use App\Models\PlayConfigItem;
use App\Models\PlayConfigVersion;
use App\Models\PlayType;
use App\Services\AuditLogger;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Lottery\ConfigVersionStatus;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/** 后台:玩法配置版本({@see play_config_versions} / {@see play_config_items} */
final class PlayConfigStreamService

View File

@@ -2,14 +2,14 @@
namespace App\Services\Config;
use App\Lottery\ConfigVersionStatus;
use App\Models\AdminUser;
use App\Models\RiskCapItem;
use App\Models\RiskCapVersion;
use App\Services\AuditLogger;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Http\Request;
use App\Services\AuditLogger;
use App\Models\RiskCapVersion;
use Illuminate\Support\Facades\DB;
use App\Lottery\ConfigVersionStatus;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/** 后台:风控封顶版本({@see risk_cap_versions} / {@see risk_cap_items} */
final class RiskCapStreamService

View File

@@ -2,12 +2,12 @@
namespace App\Services\Draw;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\DrawStatus;
use App\Models\Draw;
use App\Models\DrawResultBatch;
use App\Models\DrawResultItem;
use Carbon\Carbon;
use App\Models\Draw;
use App\Lottery\DrawStatus;
use App\Models\DrawResultItem;
use App\Models\DrawResultBatch;
use App\Lottery\DrawResultBatchStatus;
/**
* `GET draw/current` 与大厅 WS 快照共用数据结构。

View File

@@ -2,11 +2,11 @@
namespace App\Services\Draw;
use App\Lottery\DrawStatus;
use App\Models\Draw;
use Carbon\Carbon;
use Illuminate\Database\QueryException;
use App\Models\Draw;
use App\Lottery\DrawStatus;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\QueryException;
/**
* 按计划生成未来的 `draws` 行(期号、时间表)。

View File

@@ -2,12 +2,12 @@
namespace App\Services\Draw;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\DrawStatus;
use App\Models\AdminUser;
use App\Models\Draw;
use App\Models\AdminUser;
use App\Lottery\DrawStatus;
use App\Models\DrawResultBatch;
use Illuminate\Support\Facades\DB;
use App\Lottery\DrawResultBatchStatus;
/**
* 人工审核通过后发布结果;或 RNG 自动生成路径内联调用同一事务字段更新。

View File

@@ -2,13 +2,13 @@
namespace App\Services\Draw;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\DrawStatus;
use App\Models\Draw;
use App\Models\DrawResultBatch;
use App\Lottery\DrawStatus;
use App\Models\DrawResultItem;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use App\Models\DrawResultBatch;
use Illuminate\Support\Collection;
use App\Lottery\DrawResultBatchStatus;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/**
* 将已发布的 {@see DrawResultItem} 聚合成前端/文档约定结构。

View File

@@ -2,14 +2,14 @@
namespace App\Services\Draw;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\DrawResultSourceType;
use App\Lottery\DrawStatus;
use App\Models\Draw;
use App\Models\DrawResultBatch;
use App\Models\DrawResultItem;
use Carbon\Carbon;
use App\Models\Draw;
use App\Lottery\DrawStatus;
use App\Models\DrawResultItem;
use App\Models\DrawResultBatch;
use Illuminate\Support\Facades\DB;
use App\Lottery\DrawResultSourceType;
use App\Lottery\DrawResultBatchStatus;
/**
* 按配置执行 RNG写入 {@see DrawResultBatch} / {@see DrawResultItem}

View File

@@ -2,11 +2,11 @@
namespace App\Services\Draw;
use App\Lottery\DrawStatus;
use Carbon\Carbon;
use App\Models\Draw;
use App\Lottery\DrawStatus;
use App\Services\LotterySettings;
use App\Services\Settlement\SettlementOrchestrator;
use Carbon\Carbon;
/**
* 每分钟调度:期号状态推进 RNG若到期号 冷静期结束时进入结算态 补齐未来缓冲。

View File

@@ -3,8 +3,8 @@
namespace App\Services\Draw;
use App\Events\DrawCountdownBroadcast;
use App\Events\DrawResultPublishedBroadcast;
use App\Events\DrawStatusChangeBroadcast;
use App\Events\DrawResultPublishedBroadcast;
/**
* 对齐界面文档 §2.1`draw.countdown``draw.status_change``result.published`(频道 `lottery-hall`)。

View File

@@ -2,11 +2,11 @@
namespace App\Services\Jackpot;
use App\Lottery\DrawStatus;
use App\Models\Draw;
use App\Models\JackpotPayoutLog;
use App\Models\JackpotPool;
use App\Models\TicketItem;
use App\Lottery\DrawStatus;
use App\Models\JackpotPool;
use App\Models\JackpotPayoutLog;
use Illuminate\Support\Collection;
/**

View File

@@ -3,9 +3,9 @@
namespace App\Services\Jackpot;
use App\Models\Draw;
use App\Models\JackpotContribution;
use App\Models\JackpotPool;
use App\Models\TicketItem;
use App\Models\JackpotPool;
use App\Models\JackpotContribution;
/**
* 产品文档 §5.11.1:每笔有效注单按比例蓄水(在下注成功路径调用,非结算)。

View File

@@ -2,13 +2,13 @@
namespace App\Services;
use App\Exceptions\PlayerAuthenticationException;
use App\Lottery\ErrorCode;
use App\Models\Player;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use Illuminate\Database\QueryException;
use App\Models\Player;
use App\Lottery\ErrorCode;
use Illuminate\Http\Request;
use Illuminate\Database\QueryException;
use App\Exceptions\PlayerAuthenticationException;
/**
* 从请求头解析玩家身份,返回已落库的 {@see Player}

View File

@@ -2,10 +2,10 @@
namespace App\Services\Settlement\Contracts;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\PublishedDrawResultBoard;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\PublishedDrawResultBoard;
interface SettlementPlayMatcher
{

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/**
* Big / 包号展开类:命中 23 档中**最优档**计奖(产品文档 Big / iBox / mBox / Box

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/**
* head / tail / odd / even / digit_big / digit_small展开组合中若有与**头奖 4D** 完全一致则中奖(赔率档 first

View File

@@ -3,9 +3,9 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\PublishedDrawResultBoard;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/**
* 阶段 6 首轮未实现的玩法:不派奖(后续补位置类、单双等匹配器)。

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_2abc后二位命中头/二/三任意一档。 */
final class Pos2AbcSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_2a / pos_2b / pos_2c后二位命中对应档。 */
final class Pos2TierSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_3abc后三位命中头/二/三任意一档;取最优档赔率。 */
final class Pos3AbcSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_3a / pos_3b / pos_3c后三位命中对应档。头奖命中时 `matched_prize_tier` 为 firstJackpot 口径)。 */
final class Pos3TierSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_4a / pos_4b / pos_4c与对应档完整 4D 一致。 */
final class Pos4ExactTierSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/** pos_4d特别奖/ pos_4e安慰奖命中任意一组即中奖。 */
final class Pos4ListTierSettlementMatcher implements SettlementPlayMatcher

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/**
* Small仅头 / / 三奖(产品文档 Small

View File

@@ -2,12 +2,12 @@
namespace App\Services\Settlement\Matchers;
use App\Models\TicketCombination;
use App\Models\TicketItem;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Models\TicketCombination;
use Illuminate\Support\Collection;
use App\Services\Settlement\OddsSnapshotReader;
use App\Services\Settlement\PublishedDrawResultBoard;
use Illuminate\Support\Collection;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
/**
* 直选类:仅与**头奖**号码完全一致中奖(产品文档 Straight / 头奖口径)。

View File

@@ -2,18 +2,18 @@
namespace App\Services\Settlement;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Services\Settlement\Matchers\BigSpreadSettlementMatcher;
use App\Services\Settlement\Matchers\FirstPrizeComboSettlementMatcher;
use App\Services\Settlement\Matchers\NoopSettlementMatcher;
use App\Services\Settlement\Contracts\SettlementPlayMatcher;
use App\Services\Settlement\Matchers\Pos2AbcSettlementMatcher;
use App\Services\Settlement\Matchers\Pos2TierSettlementMatcher;
use App\Services\Settlement\Matchers\Pos3AbcSettlementMatcher;
use App\Services\Settlement\Matchers\Pos2TierSettlementMatcher;
use App\Services\Settlement\Matchers\Pos3TierSettlementMatcher;
use App\Services\Settlement\Matchers\Pos4ExactTierSettlementMatcher;
use App\Services\Settlement\Matchers\Pos4ListTierSettlementMatcher;
use App\Services\Settlement\Matchers\BigSpreadSettlementMatcher;
use App\Services\Settlement\Matchers\SmallSpreadSettlementMatcher;
use App\Services\Settlement\Matchers\Pos4ListTierSettlementMatcher;
use App\Services\Settlement\Matchers\StraightLikeSettlementMatcher;
use App\Services\Settlement\Matchers\Pos4ExactTierSettlementMatcher;
use App\Services\Settlement\Matchers\FirstPrizeComboSettlementMatcher;
final class SettlementMatcherRegistry
{

View File

@@ -2,22 +2,22 @@
namespace App\Services\Settlement;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\DrawStatus;
use App\Lottery\SettlementBatchStatus;
use App\Models\Draw;
use App\Models\DrawResultBatch;
use App\Models\DrawResultItem;
use App\Models\JackpotPool;
use App\Models\Player;
use App\Models\SettlementBatch;
use App\Models\TicketItem;
use App\Lottery\DrawStatus;
use App\Models\JackpotPool;
use App\Models\TicketOrder;
use App\Models\DrawResultItem;
use App\Models\DrawResultBatch;
use App\Models\SettlementBatch;
use Illuminate\Support\Facades\DB;
use App\Lottery\DrawResultBatchStatus;
use App\Lottery\SettlementBatchStatus;
use App\Models\TicketSettlementDetail;
use App\Services\Jackpot\JackpotBurstAllocator;
use App\Services\Ticket\RiskPoolService;
use App\Services\Ticket\TicketWalletService;
use Illuminate\Support\Facades\DB;
use App\Services\Jackpot\JackpotBurstAllocator;
/**
* 阶段 6:对已发布开奖、处于 `settling` 的期号执行结算(匹配 回水派彩调整 Jackpot 爆池分配 明细 风险池释放 入账)。

View File

@@ -2,8 +2,8 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\ErrorCode;
use App\Exceptions\TicketOperationException;
final class NumberNormalizer
{

View File

@@ -2,17 +2,17 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\ConfigVersionStatus;
use App\Lottery\ErrorCode;
use App\Models\OddsItem;
use App\Models\OddsVersion;
use App\Models\PlayConfigItem;
use App\Models\PlayConfigVersion;
use App\Models\PlayType;
use App\Lottery\ErrorCode;
use App\Models\OddsVersion;
use App\Models\RiskCapItem;
use App\Models\PlayConfigItem;
use App\Models\RiskCapVersion;
use App\Models\PlayConfigVersion;
use Illuminate\Support\Collection;
use App\Lottery\ConfigVersionStatus;
use App\Exceptions\TicketOperationException;
final class PlayCatalogResolver
{

View File

@@ -2,12 +2,12 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\ErrorCode;
use App\Models\OddsItem;
use App\Models\PlayConfigItem;
use App\Models\PlayType;
use App\Lottery\ErrorCode;
use App\Models\PlayConfigItem;
use Illuminate\Support\Collection;
use App\Exceptions\TicketOperationException;
final class PlayRuleEngine
{

View File

@@ -2,11 +2,11 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\ErrorCode;
use App\Models\RiskPool;
use App\Models\RiskPoolLockLog;
use App\Lottery\ErrorCode;
use App\Models\TicketItem;
use App\Models\RiskPoolLockLog;
use App\Exceptions\TicketOperationException;
final class RiskPoolService
{

View File

@@ -2,16 +2,16 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\DrawStatus;
use App\Lottery\ErrorCode;
use App\Models\Draw;
use App\Models\Player;
use App\Models\TicketCombination;
use App\Lottery\ErrorCode;
use App\Models\TicketItem;
use App\Lottery\DrawStatus;
use App\Models\TicketOrder;
use App\Services\Jackpot\JackpotContributionService;
use App\Models\TicketCombination;
use Illuminate\Support\Facades\DB;
use App\Exceptions\TicketOperationException;
use App\Services\Jackpot\JackpotContributionService;
final class TicketPlacementService
{

View File

@@ -2,10 +2,10 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\DrawStatus;
use App\Lottery\ErrorCode;
use App\Models\Draw;
use App\Lottery\ErrorCode;
use App\Lottery\DrawStatus;
use App\Exceptions\TicketOperationException;
final class TicketPreviewService
{

View File

@@ -2,12 +2,12 @@
namespace App\Services\Ticket;
use App\Exceptions\TicketOperationException;
use App\Lottery\ErrorCode;
use App\Models\Player;
use App\Models\PlayerWallet;
use App\Models\TicketOrder;
use App\Models\WalletTxn;
use App\Lottery\ErrorCode;
use App\Models\TicketOrder;
use App\Models\PlayerWallet;
use App\Exceptions\TicketOperationException;
final class TicketWalletService
{

View File

@@ -3,8 +3,8 @@
namespace App\Services\Wallet;
use App\Models\Player;
use GuzzleHttp\Exception\ConnectException;
use Illuminate\Support\Facades\Http;
use GuzzleHttp\Exception\ConnectException;
/**
* 通过 HTTP 调用主站钱包 API路径见 config lottery.main_site.wallet_*_path

View File

@@ -2,17 +2,17 @@
namespace App\Services\Wallet;
use App\Exceptions\WalletOperationException;
use App\Lottery\ErrorCode;
use App\Models\Currency;
use App\Models\Player;
use App\Models\Currency;
use App\Models\WalletTxn;
use App\Lottery\ErrorCode;
use Illuminate\Support\Str;
use App\Models\PlayerWallet;
use App\Models\TransferOrder;
use App\Models\WalletTxn;
use App\Services\LotterySettings;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Illuminate\Database\QueryException;
use App\Exceptions\WalletOperationException;
/**
* 主站 彩票钱包:转入 / 转出(幂等键 + 流水 + 订单)。