优化ai小班长

This commit is contained in:
2026-04-12 22:42:32 +08:00
parent d739fc7028
commit 353aaaf6ce
6 changed files with 36 additions and 36 deletions
+5 -1
View File
@@ -105,13 +105,17 @@ class BaccaratLossCoverService
/**
* 获取某个下注时间点命中的活动。
*
* 这里按管理员设定的开始/结束时间窗口判断,
* 不强依赖后台状态已经及时切到 active
* 这样刚到开始时间的活动也能立即参与买单判定。
*/
public function findEventForBetTime(?Carbon $betTime = null): ?BaccaratLossCoverEvent
{
$betTime = $betTime ?? now();
return BaccaratLossCoverEvent::query()
->whereIn('status', ['active', 'settlement_pending', 'claimable'])
->whereNotIn('status', ['cancelled', 'completed'])
->where('starts_at', '<=', $betTime)
->where('ends_at', '>=', $betTime)
->orderByDesc('id')