Browse Source

修改到docker外运行环境

tags/v1.0.0^2
林万龙 3 years ago
parent
commit
fbb4fc4e86
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java

+ 6
- 0
src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java View File

@@ -95,6 +95,9 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS
// 关于IP与省份的关系保存到缓存中
// 使用时,先在缓存中获取匹配信息
// 用mongodb实现
if(iPProvinceService == null) {
iPProvinceService = new IPProvinceServiceImpl();
}
IPProvinceEntity ipProvinceEntity = iPProvinceService.getIPProvince(ipAddress);
if (ipProvinceEntity == null) {
// 匹配不到,再请求高德IP定位服务。
@@ -125,6 +128,9 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS
public void createIPProvince(String ipAddress, String province) {
log.debug("异步创建推送失败任务记录!");
try {
if(iPProvinceService == null) {
iPProvinceService = new IPProvinceServiceImpl();
}
IPProvinceEntity ipProvinceEntity = iPProvinceService.getIPProvince(ipAddress);
if (ipProvinceEntity == null) {
//DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");


Loading…
Cancel
Save