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