refine: normalize bet log names and init_table_fail level

This commit is contained in:
testadmin
2026-05-14 11:50:59 +08:00
parent a180fe8385
commit 3bac9960b8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -56,6 +56,7 @@ class ToBetRouletteService{
$res = Bet::toBet($tableInfo,$userInfo,$numberTabInfo,$prevBetInfo,$data,$seat_num,$betTotalAmount,$time,0,$fieldName); $res = Bet::toBet($tableInfo,$userInfo,$numberTabInfo,$prevBetInfo,$data,$seat_num,$betTotalAmount,$time,0,$fieldName);
$numberTabAmount = string_to_array($numberTabInfo[$fieldName]); $numberTabAmount = string_to_array($numberTabInfo[$fieldName]);
if($res){ 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']); $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); $totalAmountArray = RouletteUtil::amountInc($numberTabAmount, $data);
$round = [ $round = [
@@ -63,9 +64,8 @@ class ToBetRouletteService{
'amount_item' => $data 'amount_item' => $data
]; ];
$ws->to(SocketSession::HOUSE_NAME)->emit('allBetAmount',['status' => true, 'table_id' => $tableInfo['id'], 'round' => $round]); $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{ }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']); $ws->emit('toBet',['status' => false, 'table_id' => $tableInfo['id'], 'msg' => 'to_bet_fail']);
} }
SocketSession::resetRepeat($fd,'user','isToBet'); SocketSession::resetRepeat($fd,'user','isToBet');
+1 -1
View File
@@ -39,7 +39,7 @@ class InitTableService
Logger::info(Logger::CAT_GAME, 'init_create_number_tab', ['table_id' => $tableInfo['id'], 'boot_id' => $lastBoot['id'] ?? '']); Logger::info(Logger::CAT_GAME, 'init_create_number_tab', ['table_id' => $tableInfo['id'], 'boot_id' => $lastBoot['id'] ?? '']);
} }
if (!$lastNumberTab) { 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; return $lastNumberTab;
} }