优化ai小班长
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user