session_id

This commit is contained in:
2025-12-05 09:19:09 +08:00
parent e4dbe66dd2
commit b911368088

View File

@@ -121,6 +121,7 @@ namespace extend\chat\model;
$list_arr = []; $list_arr = [];
// 绑定自己的UID // 绑定自己的UID
Gateway::bindUid($client_id, self::getUid(self::$user_info['uid'], self::$user_info['user_type'])); Gateway::bindUid($client_id, self::getUid(self::$user_info['uid'], self::$user_info['user_type']));
Log::info('已经绑定--》' . self::getUid(self::$user_info['uid'], self::$user_info['user_type']) . '《---》' . $client_id);
// 先拿到会话列表 // 先拿到会话列表
$list_json = Redis::get('usermsg:list:' . self::$user_info['user_type'] . ':' . self::$user_info['uid']); $list_json = Redis::get('usermsg:list:' . self::$user_info['user_type'] . ':' . self::$user_info['uid']);
if($list_json) { if($list_json) {
@@ -277,6 +278,7 @@ namespace extend\chat\model;
if(Gateway::isUidOnline($str_uid)) { if(Gateway::isUidOnline($str_uid)) {
$notice_data['nick'] = $user['nick_name']; $notice_data['nick'] = $user['nick_name'];
$notice_data['send_time'] = formatWeChatTime($notice_data['send_time']); $notice_data['send_time'] = formatWeChatTime($notice_data['send_time']);
Log::info('要发消息了---》' . $str_uid);
Gateway::sendToUid($str_uid, self::sendReceive($notice_data)); Gateway::sendToUid($str_uid, self::sendReceive($notice_data));
}else { }else {
// 存消息 // 存消息