|
@@ -26,6 +26,9 @@ public class IPProvinceServiceImpl implements IPProvinceService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public boolean saveIPProvince(IPProvinceEntity entity) { |
|
|
public boolean saveIPProvince(IPProvinceEntity entity) { |
|
|
|
|
|
if (iPProvinceMapper == null) { |
|
|
|
|
|
iPProvinceMapper = new IPProvinceMapper(); |
|
|
|
|
|
} |
|
|
iPProvinceMapper.save(entity); |
|
|
iPProvinceMapper.save(entity); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
@@ -33,12 +36,18 @@ public class IPProvinceServiceImpl implements IPProvinceService { |
|
|
@Override |
|
|
@Override |
|
|
public boolean updateIPProvince( |
|
|
public boolean updateIPProvince( |
|
|
IPProvinceEntity query, IPProvinceEntity update) { |
|
|
IPProvinceEntity query, IPProvinceEntity update) { |
|
|
|
|
|
if (iPProvinceMapper == null) { |
|
|
|
|
|
iPProvinceMapper = new IPProvinceMapper(); |
|
|
|
|
|
} |
|
|
iPProvinceMapper.updateFirst(query, update); |
|
|
iPProvinceMapper.updateFirst(query, update); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public boolean romveById(String id) { |
|
|
public boolean romveById(String id) { |
|
|
|
|
|
if (iPProvinceMapper == null) { |
|
|
|
|
|
iPProvinceMapper = new IPProvinceMapper(); |
|
|
|
|
|
} |
|
|
iPProvinceMapper.deleteById(id); |
|
|
iPProvinceMapper.deleteById(id); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
@@ -48,6 +57,9 @@ public class IPProvinceServiceImpl implements IPProvinceService { |
|
|
try { |
|
|
try { |
|
|
IPProvinceEntity query = new IPProvinceEntity(); |
|
|
IPProvinceEntity query = new IPProvinceEntity(); |
|
|
query.setIp(ipAddress); |
|
|
query.setIp(ipAddress); |
|
|
|
|
|
if (iPProvinceMapper == null) { |
|
|
|
|
|
iPProvinceMapper = new IPProvinceMapper(); |
|
|
|
|
|
} |
|
|
List<IPProvinceEntity> pushRecords = iPProvinceMapper.queryList(query); |
|
|
List<IPProvinceEntity> pushRecords = iPProvinceMapper.queryList(query); |
|
|
if (ObjectUtils.isNotEmpty(pushRecords)) { |
|
|
if (ObjectUtils.isNotEmpty(pushRecords)) { |
|
|
return pushRecords.get(0); |
|
|
return pushRecords.get(0); |
|
|