优化第三方均价
This commit is contained in:
+8
-3
@@ -2564,8 +2564,13 @@ public class PropertyController {
|
|||||||
mav.setModel(BasicModel.buildBadRequestModel("参数缺失:city(城市),district(区域),name(小区名)是必须参数"));
|
mav.setModel(BasicModel.buildBadRequestModel("参数缺失:city(城市),district(区域),name(小区名)是必须参数"));
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),
|
District district = null;
|
||||||
"district");
|
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) {
|
if (null == district) {
|
||||||
mav.setModel(BasicModel.buildBadRequestModel("该小区不存在"));
|
mav.setModel(BasicModel.buildBadRequestModel("该小区不存在"));
|
||||||
return mav;
|
return mav;
|
||||||
@@ -5143,7 +5148,7 @@ public class PropertyController {
|
|||||||
|
|
||||||
private Map<String, Object> getLastEvaluationPrice(District district, Evaluation evaluation, double dCredit)
|
private Map<String, Object> getLastEvaluationPrice(District district, Evaluation evaluation, double dCredit)
|
||||||
throws NumberFormatException, IllegalAccessException {
|
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<String, Object> otherPriceRets = averageStatisticsService.findFirstAverageStatictics(district.getCity(),
|
Map<String, Object> otherPriceRets = averageStatisticsService.findFirstAverageStatictics(district.getCity(),
|
||||||
district.getRegion(), district.getName(), district.getCategory(), startDate);
|
district.getRegion(), district.getName(), district.getCategory(), startDate);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class AvgPriceQueryModel {
|
|||||||
String periodType;
|
String periodType;
|
||||||
Integer houseType;
|
Integer houseType;
|
||||||
String cat;
|
String cat;
|
||||||
|
String id;
|
||||||
|
|
||||||
public String getCat() {
|
public String getCat() {
|
||||||
return cat;
|
return cat;
|
||||||
@@ -68,4 +69,12 @@ public class AvgPriceQueryModel {
|
|||||||
public void setHouseType(Integer houseType) {
|
public void setHouseType(Integer houseType) {
|
||||||
this.houseType = houseType;
|
this.houseType = houseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user