桌码或shop_id不能为空
This commit is contained in:
@@ -118,14 +118,15 @@ class Events
|
||||
}
|
||||
|
||||
if(!empty($message['operate_type'])) {
|
||||
|
||||
// 限时折扣修改
|
||||
if($message['operate_type'] == 'time_discount_save') {
|
||||
// 桌码
|
||||
if(empty($message['table_code']) || empty($message['shop_id'])) {
|
||||
Gateway::sendToClient($client_id, json_encode(['msg' => '桌码或shop_id不能为空']));
|
||||
return;
|
||||
}
|
||||
$redis_str = Base::get_shopping_save_uid($message['shop_id'], $message['table_code']) . ':time_discount';
|
||||
// 限时折扣修改
|
||||
if($message['operate_type'] == 'time_discount_save') {
|
||||
if(empty($message['data'])) {
|
||||
$res = Redis::del($redis_str);
|
||||
}else {
|
||||
@@ -153,6 +154,12 @@ class Events
|
||||
Gateway::sendToClient($client_id, json_encode($snd_data));
|
||||
return;
|
||||
}elseif ($message['operate_type'] == 'time_discount_get') {
|
||||
// 桌码
|
||||
if(empty($message['table_code']) || empty($message['shop_id'])) {
|
||||
Gateway::sendToClient($client_id, json_encode(['msg' => '桌码或shop_id不能为空']));
|
||||
return;
|
||||
}
|
||||
$redis_str = Base::get_shopping_save_uid($message['shop_id'], $message['table_code']) . ':time_discount';
|
||||
// 限时折扣获取
|
||||
$snd_data = [
|
||||
'msg' => '折扣获取',
|
||||
|
||||
Reference in New Issue
Block a user