商品起售
This commit is contained in:
@@ -160,54 +160,6 @@ public class PushToClientChannelHandlerAdapter extends NettyChannelHandlerAdapte
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message 发送的消息内容
|
||||
* @param shopId 店铺Id
|
||||
// * @param clientId 客户端Id
|
||||
// * @param userFlag 为true 单发给clientId
|
||||
* 为false 群发 shopId为空 发给所有人
|
||||
*/
|
||||
// @Async
|
||||
// public void AppSendInfo(String message, String shopId,String clientId, boolean userFlag) {
|
||||
// log.info("netty连接client 发送消息 shopId:{} clientId:{} userFlag:{} message:{}",shopId,clientId,userFlag, JSONUtil.toJSONString(message));
|
||||
// if (userFlag) {
|
||||
// if (webSocketMap.containsKey(shopId)) {
|
||||
// ConcurrentHashMap<String, ChannelHandlerContext> webSockets = webSocketMap.get(shopId);
|
||||
// if(!webSockets.isEmpty()){
|
||||
// if (StringUtils.isNotBlank(clientId)) {
|
||||
// ChannelHandlerContext ctx = webSockets.get(clientId);
|
||||
// if (ctx != null) {
|
||||
// sendMesToApp(message,ctx);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isEmpty(shopId)) {
|
||||
// // 向所有用户发送信息
|
||||
// for (ConcurrentHashMap<String, ChannelHandlerContext> value : webSocketMap.values()) {
|
||||
// for (ChannelHandlerContext ctx : value.values()) {
|
||||
// sendMesToApp(message,ctx);
|
||||
// }
|
||||
// }
|
||||
// } else if (webSocketMap.containsKey(shopId)) {
|
||||
// ConcurrentHashMap<String, ChannelHandlerContext> webSockets = webSocketMap.get(shopId);
|
||||
// if((!webSockets.isEmpty() && !webSockets.keySet().isEmpty())) {
|
||||
// for (String user : webSockets.keySet()) {
|
||||
// ChannelHandlerContext ctx = webSockets.get(user);
|
||||
// if (ctx != null) {
|
||||
// log.info("netty连接client 发送消息 桌码群发 clientId:{}",user);
|
||||
// sendMesToApp(message,ctx);
|
||||
// }else {
|
||||
// log.info("netty连接client 发送消息 桌码群发 clientId:{} 失败",user);
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// log.info("netty连接client 发送消息 桌码群发 clientId:{} 失败",clientId);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
public void AppSendInfoV1(String shopId, String orderNo, JSONObject message) {
|
||||
log.info("netty连接client 发送消息 shopId:{} clientId:{} userFlag:{} message:{}", shopId, message.get("orderInfo"));
|
||||
retryQueue.computeIfAbsent(shopId, k -> new ConcurrentLinkedQueue<>()).offer(message);
|
||||
|
||||
Reference in New Issue
Block a user