/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
@@ -37,7 +37,7 @@ public class Seawater implements SeawaterEntity {
private String id;
private String category;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int status;
private Integer status;
private String city;
private String region;
private String district;
@@ -100,11 +100,11 @@ public class Seawater implements SeawaterEntity {
}
@Column(name = "status")
public int getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(int status) {
public void setStatus(Integer status) {
this.status = status;
}
@@ -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());