Bladeren bron

修改到docker外运行环境

tags/v1.0.0^2
林万龙 4 jaren geleden
bovenliggende
commit
fbb4fc4e86
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  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 Bestand weergeven

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


Laden…
Annuleren
Opslaan