修复空指针问题
This commit is contained in:
+3
@@ -2297,6 +2297,9 @@ public class DistrictServiceImpl implements DistrictService {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<District> findNearestDistrict(District district, int radiusMeters, int limit) {
|
||||
if (district == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
String cacheKey = district.getCity() + "#" + district.getRegion() + "#" + district.getName() + "#" + radiusMeters + "#" + limit;
|
||||
Object obj = CacheUtils.getValue(this.getClass(), cacheKey);
|
||||
if (obj != null) {
|
||||
|
||||
Reference in New Issue
Block a user