del print
This commit is contained in:
@@ -54,7 +54,7 @@ class Events
|
||||
// };
|
||||
// $http_worker->listen();
|
||||
if($worker->id == 1) {
|
||||
print_r('定时器');
|
||||
// print_r('定时器');
|
||||
// 启动定时器 定时器处理消息回执/在线列表
|
||||
$_SESSION['auth_timer_id'] = Timer::add(10, function (){
|
||||
Base::geteventredis_new();
|
||||
@@ -64,7 +64,7 @@ class Events
|
||||
|
||||
public static function onConnect($client_id)
|
||||
{
|
||||
print_r('连接--我是' . $client_id . "\r\n");
|
||||
// print_r('连接--我是' . $client_id . "\r\n");
|
||||
Base::add_log_file('当前在线连接总数:' . Gateway::getAllClientCount());
|
||||
Base::add_total_number($client_id, null, 'total');
|
||||
}
|
||||
@@ -223,9 +223,9 @@ class Events
|
||||
Redis::select(3);
|
||||
$red_number = Redis::get('shop:' . $message['shop_id'] . ':product-stock:' . $message['product_id']);
|
||||
}catch (\Exception $e) {
|
||||
print_r( "Redis 错误: " . $e->getMessage() . "\r\n");
|
||||
// print_r( "Redis 错误: " . $e->getMessage() . "\r\n");
|
||||
}
|
||||
print_r('库存数量-->' . $red_number . "\r\n" . date('Y-m-d H:i:s'));
|
||||
// print_r('库存数量-->' . $red_number . "\r\n" . date('Y-m-d H:i:s'));
|
||||
if(is_numeric($red_number)) {
|
||||
// 起售数量和库存之间的处理
|
||||
if(!empty($message['suitNum']) && $message['suitNum'] > 1) {
|
||||
@@ -241,7 +241,7 @@ class Events
|
||||
'status' => 0,
|
||||
'data' => []
|
||||
];
|
||||
print_r('此商品库存不足起售数量' . "\r\n" . date('Y-m-d H:i:s'));
|
||||
// print_r('此商品库存不足起售数量' . "\r\n" . date('Y-m-d H:i:s'));
|
||||
$gate_way::sendToClient($client_id, json_encode($snd_data));
|
||||
return;
|
||||
}
|
||||
@@ -292,14 +292,14 @@ class Events
|
||||
`table_code`='{$message['table_code']}'
|
||||
");
|
||||
if($data_number) {
|
||||
print_r('已有数量' . $data_number[0]['number'] . "\r\n" . date('Y-m-d H:i:s'));
|
||||
// print_r('已有数量' . $data_number[0]['number'] . "\r\n" . date('Y-m-d H:i:s'));
|
||||
$number += $data_number[0]['number'];
|
||||
if($data && $number > $data[0]['number']) {
|
||||
$number -= $data[0]['number'];
|
||||
}
|
||||
}
|
||||
}
|
||||
print_r('实际数量' . $number . "\r\n" . date('Y-m-d H:i:s'));
|
||||
// print_r('实际数量' . $number . "\r\n" . date('Y-m-d H:i:s'));
|
||||
if($red_number < $number) {
|
||||
$snd_data = [
|
||||
'msg' => '此商品库存不足',
|
||||
|
||||
Reference in New Issue
Block a user