优惠券+异常全局处理
This commit is contained in:
@@ -111,18 +111,6 @@ public class AppWebSocketServer {
|
||||
serverList.add(this);
|
||||
webSocketMap.put(tableId + "-" + shopId, serverList);
|
||||
}
|
||||
SocketSession socketSession = new SocketSession();
|
||||
socketSession.setSession(session);
|
||||
socketSession.setShopId(shopId);
|
||||
socketSession.setTableId(tableId);
|
||||
socketSession.setUserId(userId);
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos = new ObjectOutputStream(bos);
|
||||
oos.writeObject(session);
|
||||
byte[] sessionData = bos.toByteArray();
|
||||
|
||||
// 将序列化后的会话数据存储到Redis中
|
||||
redisUtils.saveHashAll(session.getId().getBytes(), sessionData);
|
||||
if (userMap.containsKey(tableId + "-" + shopId)) {
|
||||
Set<String> userSet = userMap.get(tableId + "-" + shopId);
|
||||
userSet.add(userId);
|
||||
|
||||
Reference in New Issue
Block a user