修复扫牌器获取的 boot_id是旧数据的问题,导致下注等异常
This commit is contained in:
@@ -8,6 +8,7 @@ use app\models\bet\Bet;
|
||||
use app\models\process\NumberTab;
|
||||
use app\models\user\User;
|
||||
use app\models\user\Session;
|
||||
use app\services\connect\InitTableService;
|
||||
|
||||
class ToBetCommonService
|
||||
{
|
||||
@@ -39,7 +40,8 @@ class ToBetCommonService
|
||||
return ['status' => false, 'msg' => 'to_bet_fail_10'];
|
||||
}
|
||||
}
|
||||
$numberTabInfo = NumberTab::getByTableIdOrderByIdDesc($tableInfo);
|
||||
// 使用 InitTableService::initTable 获取当前靴的最新一局,与其他服务保持一致
|
||||
$numberTabInfo = InitTableService::initTable($tableInfo);
|
||||
if ($numberTabInfo['id'] != $numberTabId){
|
||||
return ['status' => false, 'msg' => 'to_bet_fail_5'];
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ class ScanConnectService
|
||||
$ws = app('\think\swoole\WebSocket');
|
||||
$tableId = intval($event->get('table_id'));
|
||||
$tableInfo = Table::get($tableId);
|
||||
$numberTabInfo = NumberTab::getByTableIdOrderByIdDesc($tableInfo);
|
||||
// 使用 InitTableService::initTable 获取当前靴的最新一局,与其他服务保持一致
|
||||
$numberTabInfo = InitTableService::initTable($tableInfo);
|
||||
if (!$numberTabInfo){
|
||||
$ws->emit('onlineLogin',['status' => false, 'msg' => 'Not NumberTab Data']);
|
||||
$ws->close();
|
||||
|
||||
Reference in New Issue
Block a user