mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
update 将桩与连接channel的关系改为一对多
This commit is contained in:
@@ -22,7 +22,7 @@ public interface YKCBusinessService {
|
||||
|
||||
/**
|
||||
* 桩退出
|
||||
* @param channelId channelId
|
||||
* @param ctx channelId
|
||||
*/
|
||||
void exit(ChannelId channelId);
|
||||
void exit(ChannelHandlerContext ctx);
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ public class YKCBusinessServiceImpl implements YKCBusinessService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exit(ChannelId channelId) {
|
||||
public void exit(ChannelHandlerContext ctx) {
|
||||
// 获取桩编号
|
||||
String pileSn = PileChannelEntity.getPileSnByChannelId(channelId.asLongText());
|
||||
String pileSn = PileChannelEntity.getPileSnByChannelId(ctx.channel().id().asLongText());
|
||||
if (StringUtils.isBlank(pileSn)) {
|
||||
return;
|
||||
}
|
||||
@@ -86,6 +86,9 @@ public class YKCBusinessServiceImpl implements YKCBusinessService {
|
||||
String jsonMsg = YKCFrameTypeCode.PILE_LOG_OUT.getValue() + ": 充电桩主动断开链接";
|
||||
pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, "");
|
||||
|
||||
// 删除连接
|
||||
// PileChannelEntity.deleteChannel(pileSn, ctx);
|
||||
|
||||
// 删除桩编号和channel的关系
|
||||
// PileChannelEntity.removeByPileSn(pileSn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user