Selaa lähdekoodia

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

develop
林万龙 3 vuotta sitten
vanhempi
commit
8f4158ed06
37 muutettua tiedostoa jossa 102 lisäystä ja 103 poistoa
  1. +3
    -0
      .idea/BeidouAstPos.iml
  2. +6
    -0
      .idea/compiler.xml
  3. +9
    -0
      .idea/libraries/mongodb_driver_3_11_2.xml
  4. +9
    -0
      .idea/libraries/mongodb_driver_core_3_11_2.xml
  5. +11
    -0
      .idea/libraries/spring_boot_2_2_5_RELEASE_sources.xml
  6. +4
    -11
      src/main/java/com/telpo/beidouast/BaidouAstApplication.java
  7. +1
    -1
      src/main/java/com/telpo/beidouast/annotation/MongoSwitch.java
  8. +1
    -1
      src/main/java/com/telpo/beidouast/co/PositionConfigInfo.java
  9. +2
    -2
      src/main/java/com/telpo/beidouast/common/CSVUtil.java
  10. +2
    -2
      src/main/java/com/telpo/beidouast/common/HexConvert.java
  11. +1
    -1
      src/main/java/com/telpo/beidouast/common/OkHttpUtil.java
  12. +1
    -1
      src/main/java/com/telpo/beidouast/common/RedisUtil.java
  13. +1
    -1
      src/main/java/com/telpo/beidouast/common/SocketClient.java
  14. +1
    -1
      src/main/java/com/telpo/beidouast/config/AsyncExecutorConfig.java
  15. +1
    -1
      src/main/java/com/telpo/beidouast/config/OkHttpConfig.java
  16. +2
    -4
      src/main/java/com/telpo/beidouast/config/PositionConfig.java
  17. +1
    -1
      src/main/java/com/telpo/beidouast/config/SchedulingExecutorConfig.java
  18. +1
    -1
      src/main/java/com/telpo/beidouast/config/db/MongoDbContext.java
  19. +1
    -1
      src/main/java/com/telpo/beidouast/config/db/MongoListProperties.java
  20. +1
    -1
      src/main/java/com/telpo/beidouast/config/db/MultiMongoTemplate.java
  21. +0
    -26
      src/main/java/com/telpo/beidouast/controller/DipperPositionController.java
  22. +2
    -2
      src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java
  23. +1
    -1
      src/main/java/com/telpo/beidouast/enums/DipperReturnValue.java
  24. +5
    -5
      src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java
  25. +1
    -1
      src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java
  26. +3
    -3
      src/main/java/com/telpo/beidouast/mapper/IPProvinceMapper.java
  27. +3
    -7
      src/main/java/com/telpo/beidouast/server/DipperPositionServer.java
  28. +1
    -1
      src/main/java/com/telpo/beidouast/service/IDipperAstPosAsyncTaskService.java
  29. +1
    -1
      src/main/java/com/telpo/beidouast/service/IDipperAstTimeAsyncTaskService.java
  30. +1
    -1
      src/main/java/com/telpo/beidouast/service/IDipperDataAsyncTaskService.java
  31. +1
    -1
      src/main/java/com/telpo/beidouast/service/IPProvinceService.java
  32. +6
    -6
      src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java
  33. +4
    -4
      src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java
  34. +6
    -6
      src/main/java/com/telpo/beidouast/service/impl/DipperDataAsyncTaskServiceImpl.java
  35. +5
    -5
      src/main/java/com/telpo/beidouast/service/impl/IPProvinceServiceImpl.java
  36. +2
    -2
      src/main/java/com/telpo/beidouast/task/ScheduleService.java
  37. +1
    -1
      src/main/java/com/telpo/beidouast/vo/IPProvinceVo.java

+ 3
- 0
.idea/BeidouAstPos.iml Näytä tiedosto

@@ -5,5 +5,8 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="mongodb-driver-3.11.2" level="project" />
<orderEntry type="library" name="mongodb-driver-core-3.11.2" level="project" />
<orderEntry type="library" name="spring-boot-2.2.5.RELEASE-sources" level="project" />
</component>
</module>

+ 6
- 0
.idea/compiler.xml Näytä tiedosto

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="8" />
</component>
</project>

+ 9
- 0
.idea/libraries/mongodb_driver_3_11_2.xml Näytä tiedosto

@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="mongodb-driver-3.11.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/mongodb-driver/3.11.2/mongodb-driver-3.11.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

+ 9
- 0
.idea/libraries/mongodb_driver_core_3_11_2.xml Näytä tiedosto

@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="mongodb-driver-core-3.11.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/mongodb-driver-core/3.11.2/mongodb-driver-core-3.11.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

+ 11
- 0
.idea/libraries/spring_boot_2_2_5_RELEASE_sources.xml Näytä tiedosto

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="spring-boot-2.2.5.RELEASE-sources">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/2.2.5.RELEASE/spring-boot-2.2.5.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/2.2.5.RELEASE/spring-boot-2.2.5.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>

+ 4
- 11
src/main/java/com/telpo/beidouast/BaidouAstApplication.java Näytä tiedosto

@@ -1,20 +1,14 @@
package com.telpo.dipperposition;

import com.alibaba.nacos.api.NacosFactory;
import com.alibaba.nacos.api.config.ConfigService;
import com.alibaba.nacos.api.config.listener.Listener;
import com.alibaba.nacos.api.PropertyKeyConst;
import com.alibaba.nacos.api.exception.NacosException;
import com.telpo.dipperposition.co.PositionConfigInfo;
import com.telpo.dipperposition.server.DipperPositionServer;
import com.telpo.dipperposition.server.EphAsyncServer;
import com.telpo.dipperposition.server.TimeAsyncServer;
import com.telpo.beidouast.co.PositionConfigInfo;
import com.telpo.beidouast.server.DipperPositionServer;
import com.telpo.beidouast.server.EphAsyncServer;
import com.telpo.beidouast.server.TimeAsyncServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -30,7 +24,6 @@ import java.util.concurrent.Executor;
* @create: 2020-06-18 16:39
*/
@SpringBootApplication
@EnableDiscoveryClient
@ConfigurationPropertiesScan
@EnableAsync
@EnableScheduling


+ 1
- 1
src/main/java/com/telpo/beidouast/annotation/MongoSwitch.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.annotation;
package com.telpo.beidouast.annotation;

import java.lang.annotation.*;



+ 1
- 1
src/main/java/com/telpo/beidouast/co/PositionConfigInfo.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.co;
package com.telpo.beidouast.co;

import lombok.Getter;
import lombok.Setter;


+ 2
- 2
src/main/java/com/telpo/beidouast/common/CSVUtil.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.common;
package com.telpo.beidouast.common;

import com.csvreader.CsvReader;
import com.csvreader.CsvWriter;
@@ -10,7 +10,7 @@ import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
/**
* @program: dipperposition
* @program: beidouast
* @description: CSV文件读取单元
* @author: linwl
* @create: 2021-01-14 11:19


+ 2
- 2
src/main/java/com/telpo/beidouast/common/HexConvert.java Näytä tiedosto

@@ -1,7 +1,7 @@
package com.telpo.dipperposition.common;
package com.telpo.beidouast.common;

/**
* @program: dipperposition
* @program: beidouast
* @description: 16进制处理
* @author: linwl
* @create: 2021-01-14 22:05


+ 1
- 1
src/main/java/com/telpo/beidouast/common/OkHttpUtil.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.common;
package com.telpo.beidouast.common;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;


+ 1
- 1
src/main/java/com/telpo/beidouast/common/RedisUtil.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.common;
package com.telpo.beidouast.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;


+ 1
- 1
src/main/java/com/telpo/beidouast/common/SocketClient.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.common;
package com.telpo.beidouast.common;

import lombok.extern.slf4j.Slf4j;



+ 1
- 1
src/main/java/com/telpo/beidouast/config/AsyncExecutorConfig.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config;
package com.telpo.beidouast.config;

import lombok.Getter;
import lombok.Setter;


+ 1
- 1
src/main/java/com/telpo/beidouast/config/OkHttpConfig.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config;
package com.telpo.beidouast.config;

import lombok.extern.slf4j.Slf4j;
import okhttp3.ConnectionPool;


+ 2
- 4
src/main/java/com/telpo/beidouast/config/PositionConfig.java Näytä tiedosto

@@ -1,6 +1,5 @@
package com.telpo.dipperposition.config;
package com.telpo.beidouast.config;

import com.telpo.dipperposition.co.PositionConfigInfo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@@ -41,8 +40,7 @@ public class PositionConfig {
//
// @Value(value = "${position.server.starsAsycPort}")
// private String starsAsycServerPort;

PositionConfig()
// PositionConfig()
{
//hello = configurableApplicationContext.getEnvironment().getProperty("position.hello");
//name = configurableApplicationContext.getEnvironment().getProperty("spring.application.name");


+ 1
- 1
src/main/java/com/telpo/beidouast/config/SchedulingExecutorConfig.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config;
package com.telpo.beidouast.config;

import lombok.Getter;
import lombok.Setter;


+ 1
- 1
src/main/java/com/telpo/beidouast/config/db/MongoDbContext.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config.db;
package com.telpo.beidouast.config.db;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;


+ 1
- 1
src/main/java/com/telpo/beidouast/config/db/MongoListProperties.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config.db;
package com.telpo.beidouast.config.db;

import lombok.Data;
import lombok.Getter;


+ 1
- 1
src/main/java/com/telpo/beidouast/config/db/MultiMongoTemplate.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.config.db;
package com.telpo.beidouast.config.db;

import com.mongodb.client.MongoDatabase;
import lombok.extern.slf4j.Slf4j;


+ 0
- 26
src/main/java/com/telpo/beidouast/controller/DipperPositionController.java Näytä tiedosto

@@ -1,26 +0,0 @@
package com.telpo.dipperposition.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
* @program: DipperPositionController
* @description: 北斗定位
* @author: linwl
* @create: 2020-07-10 14:01
*/
@RestController
@Slf4j
public class DipperPositionController {
@Value(value = "${position-server.serverAddr}")
private String hello;
//RzlAccount rzlAccount;

@RequestMapping("/getPos")
public String getPos() {
return "return serverAddr = " + hello;
}
}

+ 2
- 2
src/main/java/com/telpo/beidouast/entity/mongo/IPProvinceEntity.java Näytä tiedosto

@@ -1,6 +1,6 @@
package com.telpo.dipperposition.entity.mongo;
package com.telpo.beidouast.entity.mongo;

import com.telpo.dipperposition.vo.IPProvinceVo;
import com.telpo.beidouast.vo.IPProvinceVo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;


+ 1
- 1
src/main/java/com/telpo/beidouast/enums/DipperReturnValue.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.enums;
package com.telpo.beidouast.enums;

/**
* @program: DipperReturnValue


+ 5
- 5
src/main/java/com/telpo/beidouast/handler/NettyServerHandler.java Näytä tiedosto

@@ -1,9 +1,9 @@
package com.telpo.dipperposition.handler;
package com.telpo.beidouast.handler;

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.beidouast.enums.DipperReturnValue;
import com.telpo.beidouast.service.IDipperAstPosAsyncTaskService;
import com.telpo.beidouast.service.IDipperAstTimeAsyncTaskService;
import com.telpo.beidouast.service.IDipperDataAsyncTaskService;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.socket.SocketChannel;


+ 1
- 1
src/main/java/com/telpo/beidouast/handler/ServerChannelInitializer.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.handler;
package com.telpo.beidouast.handler;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;


+ 3
- 3
src/main/java/com/telpo/beidouast/mapper/IPProvinceMapper.java Näytä tiedosto

@@ -1,7 +1,7 @@
package com.telpo.dipperposition.mapper;
package com.telpo.beidouast.mapper;

import com.telpo.dipperposition.annotation.MongoSwitch;
import com.telpo.dipperposition.entity.mongo.IPProvinceEntity;
import com.telpo.beidouast.annotation.MongoSwitch;
import com.telpo.beidouast.entity.mongo.IPProvinceEntity;
import db.BaseMongoDbDao;
import org.springframework.stereotype.Repository;



+ 3
- 7
src/main/java/com/telpo/beidouast/server/DipperPositionServer.java Näytä tiedosto

@@ -1,11 +1,7 @@
package com.telpo.dipperposition.server;
package com.telpo.beidouast.server;

import com.alibaba.nacos.api.NacosFactory;
import com.alibaba.nacos.api.PropertyKeyConst;
import com.alibaba.nacos.api.config.ConfigService;
import com.alibaba.nacos.api.exception.NacosException;
import com.telpo.dipperposition.co.PositionConfigInfo;
import com.telpo.dipperposition.handler.ServerChannelInitializer;
import com.telpo.beidouast.co.PositionConfigInfo;
import com.telpo.beidouast.handler.ServerChannelInitializer;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;


+ 1
- 1
src/main/java/com/telpo/beidouast/service/IDipperAstPosAsyncTaskService.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.service;
package com.telpo.beidouast.service;

import java.io.UnsupportedEncodingException;



+ 1
- 1
src/main/java/com/telpo/beidouast/service/IDipperAstTimeAsyncTaskService.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.service;
package com.telpo.beidouast.service;

/**
* @program: IDipperDataAsyncTaskService


+ 1
- 1
src/main/java/com/telpo/beidouast/service/IDipperDataAsyncTaskService.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.service;
package com.telpo.beidouast.service;

import org.springframework.beans.factory.annotation.Value;



+ 1
- 1
src/main/java/com/telpo/beidouast/service/IPProvinceService.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.service;
package com.telpo.beidouast.service;

import com.telpo.dipperposition.entity.mongo.IPProvinceEntity;
import com.telpo.dipperposition.vo.IPProvinceVo;


+ 6
- 6
src/main/java/com/telpo/beidouast/service/impl/DipperAstPosAsyncTaskServiceImpl.java Näytä tiedosto

@@ -1,13 +1,13 @@
package com.telpo.dipperposition.service.impl;
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.dipperposition.entity.mongo.IPProvinceEntity;
import com.telpo.dipperposition.mapper.IPProvinceMapper;
import com.telpo.dipperposition.service.IDipperAstPosAsyncTaskService;
import com.telpo.dipperposition.service.IPProvinceService;
import com.telpo.dipperposition.vo.IPProvinceVo;
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;


+ 4
- 4
src/main/java/com/telpo/beidouast/service/impl/DipperAstTimeAsyncTaskServiceImpl.java Näytä tiedosto

@@ -1,8 +1,8 @@
package com.telpo.dipperposition.service.impl;
package com.telpo.beidouast.service.impl;

import com.telpo.dipperposition.common.HexConvert;
import com.telpo.dipperposition.common.SocketClient;
import com.telpo.dipperposition.service.IDipperAstTimeAsyncTaskService;
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;


+ 6
- 6
src/main/java/com/telpo/beidouast/service/impl/DipperDataAsyncTaskServiceImpl.java Näytä tiedosto

@@ -1,10 +1,10 @@
package com.telpo.dipperposition.service.impl;
package com.telpo.beidouast.service.impl;

import com.telpo.dipperposition.common.HexConvert;
import com.telpo.dipperposition.common.RedisUtil;
import com.telpo.dipperposition.common.SocketClient;
import com.telpo.dipperposition.config.SchedulingExecutorConfig;
import com.telpo.dipperposition.service.IDipperDataAsyncTaskService;
import com.telpo.beidouast.common.HexConvert;
import com.telpo.beidouast.common.RedisUtil;
import com.telpo.beidouast.common.SocketClient;
import com.telpo.beidouast.config.SchedulingExecutorConfig;
import com.telpo.beidouast.service.IDipperDataAsyncTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;


+ 5
- 5
src/main/java/com/telpo/beidouast/service/impl/IPProvinceServiceImpl.java Näytä tiedosto

@@ -1,9 +1,9 @@
package com.telpo.dipperposition.service.impl;
package com.telpo.beidouast.service.impl;

import com.telpo.dipperposition.entity.mongo.IPProvinceEntity;
import com.telpo.dipperposition.mapper.IPProvinceMapper;
import com.telpo.dipperposition.service.IPProvinceService;
import com.telpo.dipperposition.vo.IPProvinceVo;
import com.telpo.beidouast.entity.mongo.IPProvinceEntity;
import com.telpo.beidouast.mapper.IPProvinceMapper;
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.springframework.beans.factory.annotation.Autowired;


+ 2
- 2
src/main/java/com/telpo/beidouast/task/ScheduleService.java Näytä tiedosto

@@ -1,6 +1,6 @@
package com.telpo.dipperposition.task;
package com.telpo.beidouast.task;

import com.telpo.dipperposition.service.IDipperDataAsyncTaskService;
import com.telpo.beidouast.service.IDipperDataAsyncTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;


+ 1
- 1
src/main/java/com/telpo/beidouast/vo/IPProvinceVo.java Näytä tiedosto

@@ -1,4 +1,4 @@
package com.telpo.dipperposition.vo;
package com.telpo.beidouast.vo;

import lombok.Getter;
import lombok.Setter;


Loading…
Peruuta
Tallenna