优惠券+异常全局处理

This commit is contained in:
19991905653
2024-04-10 18:16:28 +08:00
parent 342d0d82e1
commit 3a90299b64
43 changed files with 1374 additions and 579 deletions

View File

@@ -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);