redis edit
This commit is contained in:
parent
215123b5a2
commit
d0367bbc44
|
|
@ -4,6 +4,7 @@ namespace extend\workermans\model;
|
|||
|
||||
use ba\Exception;
|
||||
use ba\Random;
|
||||
use support\Redis;
|
||||
use support\think\Db;
|
||||
use GatewayWorker\Lib\Gateway;
|
||||
Use support\Log;
|
||||
|
|
@ -67,10 +68,9 @@ class Cashier extends Base
|
|||
self::gateway_query('sendToClient', [$client_id, json_encode($snd_data)]);
|
||||
|
||||
$uid = $message['account'];
|
||||
$redis = self::$redis;
|
||||
$gateway = Gateway::class;
|
||||
// 处理打印消息
|
||||
$redis->get($uid, function ($result, $redis) use($gateway, $uid){
|
||||
$result = Redis::get($uid);
|
||||
if($result) {
|
||||
$msg_info_arr = json_decode($result, true);
|
||||
$arr_n = [];
|
||||
|
|
@ -85,9 +85,8 @@ class Cashier extends Base
|
|||
self::add_log_file('----离线后推送收银机订单打印无回执--' .date('Y-m-d H:i:s'). '--->' . $arr_json, 'cashier');
|
||||
$arr_n[] = $arr;
|
||||
}
|
||||
$redis->set($uid, json_encode($arr_n), self::REDIS_TIME);
|
||||
Redis::set($uid, json_encode($arr_n), self::REDIS_TIME);
|
||||
}
|
||||
});
|
||||
break;
|
||||
// 新增
|
||||
case 'add':
|
||||
|
|
|
|||
Loading…
Reference in New Issue