From 3fc0d6ca97ee30de15aee697d0c91c8f82bbeb26 Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Wed, 22 Oct 2025 15:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=98=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/workermans/model/Base.php | 4 ++-- plugin/webman/gateway/Events.php | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/extend/workermans/model/Base.php b/extend/workermans/model/Base.php index 94887df..1e1447a 100644 --- a/extend/workermans/model/Base.php +++ b/extend/workermans/model/Base.php @@ -358,7 +358,7 @@ class Base extends Model public static function savetimediscount() { - $table = Redis::get('time_discount_info'); + $table = Redis::get('time_discount:info'); if($table) { $table_arr = json_decode($table, true); foreach ($table_arr as $k => $v) { @@ -368,7 +368,7 @@ class Base extends Model Redis::del($v); } } - Redis::set('time_discount_info', json_encode($table_arr)); + Redis::set('time_discount:info', json_encode($table_arr)); } } diff --git a/plugin/webman/gateway/Events.php b/plugin/webman/gateway/Events.php index afc46fb..17353cf 100644 --- a/plugin/webman/gateway/Events.php +++ b/plugin/webman/gateway/Events.php @@ -131,13 +131,13 @@ class Events }else { $res = Redis::set($redis_str, $message['data']); // 将桌号存入redis 以便及时删除 - $time_discount_info = Redis::get('time_discount_info'); + $time_discount_info = Redis::get('time_discount:info'); if($time_discount_info) { $time_discount_info_arr = json_decode($time_discount_info, true); $time_discount_info_arr = array_merge($time_discount_info_arr, $redis_str); - Redis::set('time_discount_info', json_encode($time_discount_info_arr)); + Redis::set('time_discount:info', json_encode($time_discount_info_arr)); }else { - Redis::set('time_discount_info', json_encode($redis_str)); + Redis::set('time_discount:info', json_encode($redis_str)); } } $snd_data = [ @@ -164,14 +164,6 @@ class Events return; } } - if(!empty($message['operate_type']) && $message['operate_type'] == 'time_discount_get') { - // 桌码 - if(empty($message['table_code'])) { - Gateway::sendToClient($client_id, json_encode(['msg' => '桌码或data不能为空'])); - return; - } - - } // 只在初始化的时候绑定 if(!empty($message['operate_type']) && $message['operate_type'] == 'init') {