Przeglądaj źródła

修改到docker外运行环境

tags/v1.0.0^2
林万龙 3 lat temu
rodzic
commit
30454276e6
1 zmienionych plików z 12 dodań i 0 usunięć
  1. +12
    -0
      src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java

+ 12
- 0
src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java Wyświetl plik

@@ -6,6 +6,9 @@ import com.telpo.dipperposition.enums.DipperReturnValue;
import com.telpo.dipperposition.service.IDipperAstPosAsyncTaskService;
import com.telpo.dipperposition.service.IDipperAstTimeAsyncTaskService;
import com.telpo.dipperposition.service.IDipperDataAsyncTaskService;
import com.telpo.dipperposition.service.impl.DipperAstPosAsyncTaskServiceImpl;
import com.telpo.dipperposition.service.impl.DipperAstTimeAsyncTaskServiceImpl;
import com.telpo.dipperposition.service.impl.DipperDataAsyncTaskServiceImpl;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.socket.SocketChannel;
@@ -110,6 +113,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
//if (AST_TIME_CMD.equals(recvmg)) {
if (AST_TIME_CMD.equals(msg)) {
// 初始时间辅助输入;
if (dipperTimeAsyncTaskService == null) {
dipperTimeAsyncTaskService = new DipperAstTimeAsyncTaskServiceImpl();
}
channelAns = dipperTimeAsyncTaskService.pushAstTime();
}

@@ -123,6 +129,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
// positionConfig.getCenterProvince(),
// positionConfig.getIpPositionRequestPath(),
// positionConfig.getIpPositionRequestKey());
if (dipperAstPosAsyncTaskService == null) {
dipperAstPosAsyncTaskService = new DipperAstPosAsyncTaskServiceImpl();
}
channelAns = dipperAstPosAsyncTaskService.pushAstPos(ipAddress,
"/csv/provinceLonAlt.csv",
"湖北省",
@@ -134,6 +143,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
//if (Integer.parseInt(starsAsycServerPort) == channel.localAddress().getPort()) {
//if (AST_POS_CMD.equals(recvmg)) {
if (AST_POS_CMD.equals(msg)) {
if (dipperDataAsyncTaskService == null) {
dipperDataAsyncTaskService = new DipperDataAsyncTaskServiceImpl();
}
channelAns = dipperDataAsyncTaskService.getAstEPH();
}



Ładowanie…
Anuluj
Zapisz