瀏覽代碼

修改到docker外运行环境

tags/v1.0.0^2
林万龙 3 年之前
父節點
當前提交
90c96317a5
共有 1 個檔案被更改,包括 12 行新增0 行删除
  1. +12
    -0
      src/main/java/com/telpo/dipperposition/service/impl/IPProvinceServiceImpl.java

+ 12
- 0
src/main/java/com/telpo/dipperposition/service/impl/IPProvinceServiceImpl.java 查看文件

@@ -26,6 +26,9 @@ public class IPProvinceServiceImpl implements IPProvinceService {

@Override
public boolean saveIPProvince(IPProvinceEntity entity) {
if (iPProvinceMapper == null) {
iPProvinceMapper = new IPProvinceMapper();
}
iPProvinceMapper.save(entity);
return true;
}
@@ -33,12 +36,18 @@ public class IPProvinceServiceImpl implements IPProvinceService {
@Override
public boolean updateIPProvince(
IPProvinceEntity query, IPProvinceEntity update) {
if (iPProvinceMapper == null) {
iPProvinceMapper = new IPProvinceMapper();
}
iPProvinceMapper.updateFirst(query, update);
return true;
}

@Override
public boolean romveById(String id) {
if (iPProvinceMapper == null) {
iPProvinceMapper = new IPProvinceMapper();
}
iPProvinceMapper.deleteById(id);
return false;
}
@@ -48,6 +57,9 @@ public class IPProvinceServiceImpl implements IPProvinceService {
try {
IPProvinceEntity query = new IPProvinceEntity();
query.setIp(ipAddress);
if (iPProvinceMapper == null) {
iPProvinceMapper = new IPProvinceMapper();
}
List<IPProvinceEntity> pushRecords = iPProvinceMapper.queryList(query);
if (ObjectUtils.isNotEmpty(pushRecords)) {
return pushRecords.get(0);


Loading…
取消
儲存