/house/around接口

This commit is contained in:
majintao
2024-11-29 15:43:41 +08:00
parent ffda7495bf
commit 108e81edae
2 changed files with 10 additions and 4 deletions
@@ -1021,7 +1021,13 @@ public class HouseController {
seawater.setAddress(house.getAddress());
seawater.setName(house.getDistrictName());
seawater.setSize(house.getArea());
seawater.setUnitPrice(house.getAvgPrice());
if (house.getAvgPrice() != null) {
seawater.setUnitPrice(house.getAvgPrice());
}else {
if (house.getTotalPrice() != null &&house.getTotalPrice()>0 && house.getArea()!=null && house.getArea()>0){
seawater.setUnitPrice((int) (house.getTotalPrice() / house.getArea()));
}
}
seawater.setTotalPrice(house.getTotalPrice());
seawater.setDirection(house.getDirection());
seawater.setFloor(house.getFloor());