群信息

This commit is contained in:
2025-12-04 16:14:56 +08:00
parent ef4fba8426
commit d23305cf3d

View File

@@ -269,6 +269,43 @@ class Shopping extends Base
Log::info('删除购物车时[error]->>>>>' . $e->getMessage());
}
break;
case 'rottable':
if (empty($message['table_code']) || empty($message['new_table_code'])) {
self::gateway_query('sendToClient', [$client_id, json_encode(['msg' => '桌码或新桌码必填'])]);
return;
}
try {
$data = Db::query("
SELECT * FROM `tb_cashier_cart` WHERE
`table_code`='{$message['table_code']}'");
if(!$data) {
self::gateway_query('sendToClient', [$client_id, json_encode(['msg' => '购物车不存在'])]);
return;
}
$res = self::rottable($message);
if($res) {
$status = 1;
}else {
$status = 0;
}
$rand = 'shopping_edit' . Random::build();
$snd_data = [
'msg' => '购物车转桌',
'operate_type' => 'rottable',
'msg_id' => $rand,
'status' => $status,
'type' => 'shopping',
'data' => [
'table_code' => $message['table_code'],
'new_table_code' => $message['new_table_code'],
]
];
self::gateway_query('sendToClient', [$client_id, json_encode($snd_data)]);
}catch (\ba\Exception $e) {
Log::info('修改购物车时转桌[error]->>>>>' . $e->getMessage());
}
break;
// 批量操作(打包与不打包)
case 'batch':
try {