refine: normalize bet log names and init_table_fail level
This commit is contained in:
@@ -56,6 +56,7 @@ class ToBetRouletteService{
|
||||
$res = Bet::toBet($tableInfo,$userInfo,$numberTabInfo,$prevBetInfo,$data,$seat_num,$betTotalAmount,$time,0,$fieldName);
|
||||
$numberTabAmount = string_to_array($numberTabInfo[$fieldName]);
|
||||
if($res){
|
||||
Logger::info(Logger::CAT_BET, 'roulette_bet_success', ['user_id' => $userInfo['id'], 'table_id' => $tableInfo['id'], 'amount' => $amount]);
|
||||
$ws->emit('toBet',['status' => true, 'table_id' => $tableInfo['id'], 'bet_amount_msg' => [$fieldName => $betTotalAmount], 'money' => ($userInfo['money'] - $amount),'seat_num' => $seat_num, 'msg' => 'to_bet_success']);
|
||||
$totalAmountArray = RouletteUtil::amountInc($numberTabAmount, $data);
|
||||
$round = [
|
||||
@@ -63,9 +64,8 @@ class ToBetRouletteService{
|
||||
'amount_item' => $data
|
||||
];
|
||||
$ws->to(SocketSession::HOUSE_NAME)->emit('allBetAmount',['status' => true, 'table_id' => $tableInfo['id'], 'round' => $round]);
|
||||
Logger::info(Logger::CAT_BET, 'roulette_bet_success', ['user_id' => $userInfo['id'], 'table_id' => $tableInfo['id'], 'amount' => $amount]);
|
||||
}else{
|
||||
Logger::warn(Logger::CAT_BET, 'roulette_bet_fail', ['user_id' => $userInfo['id'], 'table_id' => $tableInfo['id']]);
|
||||
Logger::warn(Logger::CAT_BET, 'roulette_bet_db_fail', ['user_id' => $userInfo['id'], 'table_id' => $tableInfo['id'], 'amount' => $amount]);
|
||||
$ws->emit('toBet',['status' => false, 'table_id' => $tableInfo['id'], 'msg' => 'to_bet_fail']);
|
||||
}
|
||||
SocketSession::resetRepeat($fd,'user','isToBet');
|
||||
|
||||
@@ -39,7 +39,7 @@ class InitTableService
|
||||
Logger::info(Logger::CAT_GAME, 'init_create_number_tab', ['table_id' => $tableInfo['id'], 'boot_id' => $lastBoot['id'] ?? '']);
|
||||
}
|
||||
if (!$lastNumberTab) {
|
||||
Logger::error(Logger::CAT_GAME, 'init_table_fail', ['table_id' => $tableInfo['id'], 'table_name' => $tableInfo['table_name'] ?? '']);
|
||||
Logger::warn(Logger::CAT_GAME, 'init_table_fail', ['table_id' => $tableInfo['id'], 'table_name' => $tableInfo['table_name'] ?? '']);
|
||||
}
|
||||
return $lastNumberTab;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user