瀏覽代碼

修改到docker外运行环境

tags/v1.0.0^2
林万龙 4 年之前
父節點
當前提交
fbb4fc4e86
共有 1 個檔案被更改,包括 6 行新增0 行删除
  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 查看文件

@@ -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…
取消
儲存