Kaynağa Gözat

非nacos北斗辅助定位项目代码提交

develop
林万龙 3 yıl önce
ebeveyn
işleme
c27b73b144
7 değiştirilmiş dosya ile 3 ekleme ve 25 silme
  1. +0
    -1
      src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java
  2. +0
    -4
      src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java
  3. +1
    -2
      src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java
  4. +0
    -6
      src/main/java/com/telpo/beidouast/server/DipperPositionServer.java
  5. +1
    -2
      src/main/java/com/telpo/beidouast/service/IPProvinceService.java
  6. +1
    -8
      src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java
  7. +0
    -2
      src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java

+ 0
- 1
src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java Dosyayı Görüntüle

@@ -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;


+ 0
- 4
src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java Dosyayı Görüntüle

@@ -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服务器处理句柄


+ 1
- 2
src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java Dosyayı Görüntüle

@@ -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<SocketChannel> {
@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));


+ 0
- 6
src/main/java/com/telpo/beidouast/server/DipperPositionServer.java Dosyayı Görüntüle

@@ -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"));


+ 1
- 2
src/main/java/com/telpo/beidouast/service/IPProvinceService.java Dosyayı Görüntüle

@@ -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


+ 1
- 8
src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java Dosyayı Görüntüle

@@ -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;

/**


+ 0
- 2
src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java Dosyayı Görüntüle

@@ -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;



Yükleniyor…
İptal
Kaydet