mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 13:38:02 +08:00
update 打印日志
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.common.enums.ykc;
|
package com.jsowell.common.enums.ykc;
|
||||||
|
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
@@ -8,6 +9,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
/**
|
/**
|
||||||
* 桩编号和channel的关联关系处理 entity
|
* 桩编号和channel的关联关系处理 entity
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class PileChannelEntity {
|
public class PileChannelEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,6 +18,9 @@ public class PileChannelEntity {
|
|||||||
private static final ConcurrentHashMap<String, Channel> manager = new ConcurrentHashMap<>();
|
private static final ConcurrentHashMap<String, Channel> manager = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
public static void put(String pileSn, Channel channel) {
|
public static void put(String pileSn, Channel channel) {
|
||||||
|
if (manager.containsKey(pileSn)) {
|
||||||
|
log.error("桩编号:【{}】已经是连接状态", pileSn);
|
||||||
|
}
|
||||||
manager.put(pileSn, channel);
|
manager.put(pileSn, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user