diff --git a/src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java b/src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java index eba5bc4..1493d1b 100644 --- a/src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java +++ b/src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java @@ -1,6 +1,5 @@ package com.telpo.beidouast.entity.mongo; -import com.telpo.beidouast.vo.IPProvinceVo; import lombok.Getter; import lombok.Setter; import lombok.ToString; diff --git a/src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java b/src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java index 6fa1a50..a7c4417 100644 --- a/src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java +++ b/src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java @@ -1,6 +1,5 @@ package com.telpo.beidouast.handler; -import com.telpo.beidouast.enums.DipperReturnValue; import com.telpo.beidouast.service.IDipperAstPosAsyncTaskService; import com.telpo.beidouast.service.IDipperAstTimeAsyncTaskService; import com.telpo.beidouast.service.IDipperDataAsyncTaskService; @@ -13,9 +12,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import java.io.InputStream; -import java.time.LocalDateTime; - /** * @program: dipperposition * @description: Netty服务器处理句柄 diff --git a/src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java b/src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java index d2baf75..b17dc52 100644 --- a/src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java +++ b/src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java @@ -1,7 +1,6 @@ package com.telpo.beidouast.handler; import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelPipeline; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; @@ -14,7 +13,7 @@ import io.netty.util.CharsetUtil; **/ public class ServerChannelInitializer extends ChannelInitializer { @Override - protected void initChannel(SocketChannel socketChannel) throws Exception { + protected void initChannel(SocketChannel socketChannel) { //添加编解码 socketChannel.pipeline().addLast("decoder", new StringDecoder(CharsetUtil.UTF_8)); socketChannel.pipeline().addLast("encoder", new StringEncoder(CharsetUtil.UTF_8)); diff --git a/src/main/java/com/telpo/beidouast/server/DipperPositionServer.java b/src/main/java/com/telpo/beidouast/server/DipperPositionServer.java index e33868c..2e10cbb 100644 --- a/src/main/java/com/telpo/beidouast/server/DipperPositionServer.java +++ b/src/main/java/com/telpo/beidouast/server/DipperPositionServer.java @@ -11,8 +11,6 @@ import io.netty.channel.socket.nio.NioServerSocketChannel; import lombok.extern.slf4j.Slf4j; import org.springframework.core.env.ConfigurableEnvironment; -import java.net.InetSocketAddress; - /** * @program: DipperPositionServer * @description: 北斗定位 @@ -23,16 +21,12 @@ import java.net.InetSocketAddress; public class DipperPositionServer { // @Autowired PositionConfigInfo positionConfigInfo; - private String serverAddr; - private Integer serverPort; private Integer timeAsycPort; private Integer posAsycPort; private Integer starsAsycPort; public DipperPositionServer(ConfigurableEnvironment environment) { - this.serverAddr = environment.getProperty("position-server.serverAddr"); - this.serverPort = Integer.parseInt(environment.getProperty("server.port")); this.timeAsycPort = Integer.parseInt(environment.getProperty("position-server.timeAsycPort")); this.posAsycPort = Integer.parseInt(environment.getProperty("position-server.posAsycPort")); this.starsAsycPort = Integer.parseInt(environment.getProperty("position-server.starsAsycPort")); diff --git a/src/main/java/com/telpo/beidouast/service/IPProvinceService.java b/src/main/java/com/telpo/beidouast/service/IPProvinceService.java index 3d8e7c4..67bda51 100644 --- a/src/main/java/com/telpo/beidouast/service/IPProvinceService.java +++ b/src/main/java/com/telpo/beidouast/service/IPProvinceService.java @@ -1,7 +1,6 @@ package com.telpo.beidouast.service; -import com.telpo.dipperposition.entity.mongo.IPProvinceEntity; -import com.telpo.dipperposition.vo.IPProvinceVo; +import com.telpo.beidouast.entity.mongo.IPProvinceEntity; /** * @program: IPProvinceService diff --git a/src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java b/src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java index 6f2c8a7..c858dce 100644 --- a/src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java @@ -1,24 +1,17 @@ package com.telpo.beidouast.service.impl; import com.alibaba.fastjson.JSONObject; -import com.google.common.base.Joiner; -import com.telpo.dipperposition.common.*; +import com.telpo.beidouast.common.*; import com.telpo.beidouast.entity.mongo.IPProvinceEntity; -import com.telpo.beidouast.mapper.IPProvinceMapper; import com.telpo.beidouast.service.IDipperAstPosAsyncTaskService; import com.telpo.beidouast.service.IPProvinceService; -import com.telpo.beidouast.vo.IPProvinceVo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.io.UnsupportedEncodingException; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; import java.util.List; /** diff --git a/src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java b/src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java index a00c5fd..b3439ad 100644 --- a/src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java @@ -1,10 +1,8 @@ package com.telpo.beidouast.service.impl; import com.telpo.beidouast.common.HexConvert; -import com.telpo.beidouast.common.SocketClient; import com.telpo.beidouast.service.IDipperAstTimeAsyncTaskService; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service;