/house/around 完善

This commit is contained in:
majintao
2024-12-06 13:16:47 +08:00
parent 657fa827c6
commit 0bec20be41
3 changed files with 103 additions and 33 deletions
@@ -376,6 +376,12 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
if(source.containsKey("elevator")){ if(source.containsKey("elevator")){
seawater.setElevator(source.getString("elevator")); seawater.setElevator(source.getString("elevator"));
} }
if(source.containsKey("level")){
seawater.setLevel(source.getString("level"));
}
if(source.containsKey("business_range")){
seawater.setBusinessRange(source.getString("business_range"));
}
try { try {
seawater.setDistance((int)jsonList.get(i).getJSONArray("sort").getDouble(0)); seawater.setDistance((int)jsonList.get(i).getJSONArray("sort").getDouble(0));
}catch (Exception e){ }catch (Exception e){
@@ -84,6 +84,20 @@ public class Seawater implements SeawaterEntity {
private String location; private String location;
private String title;
// 商铺经营范围
private String businessScope;
private String businessRange;
//商铺类型
private String shopType;
// 写字楼等级
private String level;
@Id @Id
@Column(name = "_id") @Column(name = "_id")
public String getId() { public String getId() {
@@ -473,4 +487,46 @@ public class Seawater implements SeawaterEntity {
public void setLocation(String location) { public void setLocation(String location) {
this.location = location; this.location = location;
} }
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBusinessScope() {
return businessScope;
}
public void setBusinessScope(String businessScope) {
this.businessScope = businessScope;
}
public String getShopType() {
return shopType;
}
public void setShopType(String shopType) {
this.shopType = shopType;
}
@Column(name = "level")
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
@Column(name = "business_range")
public String getBusinessRange() {
return businessRange;
}
public void setBusinessRange(String businessRange) {
this.businessRange = businessRange;
}
} }
@@ -1014,11 +1014,21 @@ public class HouseController {
seawater.setCity(house.getCity()); seawater.setCity(house.getCity());
seawater.setDistrict(house.getRegion()); seawater.setDistrict(house.getRegion());
seawater.setAddress(house.getAddress()); seawater.setAddress(house.getAddress());
String districtName = house.getDistrictName(); seawater.setName(house.getDistrictName());
if (!"暂无数据".equals(districtName) && StringUtils.isNotBlank(districtName)) { String name = house.getName();
seawater.setName(districtName); if (!"暂无数据".equals(name) && StringUtils.isNotBlank(name)) {
}else { seawater.setTitle(name);
seawater.setName(house.getName()); }
if (cat.contains("office")){
seawater.setLevel(house.getLevel());
}
if (cat.contains("shop")){
if (StringUtils.isNotBlank(house.getEstateType()) && !"其他".equals(house.getEstateType())){
seawater.setShopType(house.getEstateType());
}
if (StringUtils.isNotBlank(house.getBusinessRange())){
seawater.setBusinessScope(house.getBusinessRange());
}
} }
seawater.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea()); seawater.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice()); seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
@@ -1029,7 +1039,6 @@ public class HouseController {
seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom()); seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall()); seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet()); seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
if (house.getAvgPrice() != null && house.getAvgPrice() != 0) {
seawater.setDecoration(house.getFitment()); seawater.setDecoration(house.getFitment());
if (house.getpDate() != null && house.getpDate() > 10000000) { if (house.getpDate() != null && house.getpDate() > 10000000) {
String numberStr = String.valueOf(house.getpDate()); String numberStr = String.valueOf(house.getpDate());
@@ -1129,7 +1138,6 @@ public class HouseController {
// } // }
// } // }
// } // }
}
BasicModel basicModel = new BasicModel(200, "ok"); BasicModel basicModel = new BasicModel(200, "ok");