diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index 4b920b447..e25d59dfb 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -2564,8 +2564,13 @@ public class PropertyController { mav.setModel(BasicModel.buildBadRequestModel("参数缺失:city(城市),district(区域),name(小区名)是必须参数")); return mav; } - District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(), - "district"); + District district = null; + if(StringUtils.isNotBlank(model.getId())){ + district = districtService.findById(model.getId()); + } + if(district == null){ + district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),"district"); + } if (null == district) { mav.setModel(BasicModel.buildBadRequestModel("该小区不存在")); return mav; @@ -5143,7 +5148,7 @@ public class PropertyController { private Map getLastEvaluationPrice(District district, Evaluation evaluation, double dCredit) throws NumberFormatException, IllegalAccessException { - Date startDate = DateUtil.parseDate(DateUtil.addMonth(new Date(), -6), "yyyy-MM-dd"); + Date startDate = DateUtil.parseDate(DateUtil.addMonth(new Date(), -12), "yyyy-MM-dd"); // 第三方价格 Map otherPriceRets = averageStatisticsService.findFirstAverageStatictics(district.getCity(), district.getRegion(), district.getName(), district.getCategory(), startDate); diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/model/AvgPriceQueryModel.java b/projects/fangjia-open/src/main/java/com/fangjia/open/model/AvgPriceQueryModel.java index ef8e44a85..50e428d8a 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/model/AvgPriceQueryModel.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/model/AvgPriceQueryModel.java @@ -28,6 +28,7 @@ public class AvgPriceQueryModel { String periodType; Integer houseType; String cat; + String id; public String getCat() { return cat; @@ -68,4 +69,12 @@ public class AvgPriceQueryModel { public void setHouseType(Integer houseType) { this.houseType = houseType; } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } }