商铺房源字段修改

This commit is contained in:
majintao
2025-03-13 13:27:04 +08:00
parent 04f884ed54
commit 129f1e9a56
3 changed files with 62 additions and 72 deletions
@@ -1039,9 +1039,13 @@ public class HouseController {
seawater.setDirection(house.getDirection());
seawater.setFloor(house.getFloor() == null || house.getFloor() == 0 ? null : house.getFloor());
seawater.setMaxFloor(house.getHeight() == null || house.getHeight() == 0 ? null : house.getHeight());
seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
// seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
// seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
// seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
seawater.setDayUnitPrice(house.getDayUnitPrice() == null || house.getDayUnitPrice() == 0 ? null : house.getDayUnitPrice());
seawater.setRentType(house.getRentType());
seawater.setPayType(house.getPayType());
seawater.setBusinessStatus(house.getBusinessStatus());
seawater.setDecoration(house.getFitment());
if (house.getpDate() != null && house.getpDate() > 10000000) {
String numberStr = String.valueOf(house.getpDate());
@@ -1072,75 +1076,6 @@ public class HouseController {
houseList.add(seawater);
}
}
// } else {
// if ("sell".equals(cat)) {
// List<House> houseByLocation = houseService.findNearestHasHouseByLocation(model.getCity(), lat, lng, cat, model.getRadius(), 5);
// for (House house : houseByLocation) {
// Seawater seawater = new Seawater();
// seawater.setId(house.getId());
// seawater.setCity(house.getCity());
// seawater.setDistrict(house.getRegion());
// seawater.setAddress(house.getAddress());
// seawater.setName(house.getDistrictName());
// seawater.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
// seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
// seawater.setTotalPrice(house.getTotalPrice() == null || house.getTotalPrice() == 0 ? null : house.getTotalPrice());
// seawater.setDirection(house.getDirection());
// seawater.setFloor(house.getFloor() == null || house.getFloor() == 0 ? null : house.getFloor());
// seawater.setMaxFloor(house.getHeight() == null || house.getHeight() == 0 ? null : house.getHeight());
// seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
// seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
// seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
// if (house.getAvgPrice() != null && house.getAvgPrice() != 0) {
// seawater.setUnitPrice(house.getAvgPrice());
// } else {
// if (house.getTotalPrice() != null && house.getTotalPrice() > 0 && house.getArea() != null && house.getArea() > 0) {
// int price = (int) (house.getTotalPrice() / house.getArea());
// seawater.setUnitPrice(price == 0 ? null : price);
// }
// }
// seawater.setDecoration(house.getFitment());
// if (house.getPublishDate() != null) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// seawater.setPublishDate(sdf.format(house.getPublishDate()));
// }
// houseList.add(seawater);
// }
// } else if ("rent".equals(cat)) {
// List<RentHouse> rentHouseByLocation = rentHouseService.findNearestHasHouseByLocation(model.getCity(), lat, lng, cat, model.getRadius(), 5);
// for (RentHouse house : rentHouseByLocation) {
// Seawater seawater = new Seawater();
// seawater.setId(house.getId());
// seawater.setCity(house.getCity());
// seawater.setDistrict(house.getRegion());
// seawater.setAddress(house.getAddress());
// seawater.setName(house.getDistrictName());
// seawater.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
// seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
// seawater.setTotalPrice(house.getTotalPrice() == null || house.getTotalPrice() == 0 ? null : house.getTotalPrice());
// seawater.setDirection(house.getDirection());
// seawater.setFloor(house.getFloor() == null || house.getFloor() == 0 ? null : house.getFloor());
// seawater.setMaxFloor(house.getHeight() == null || house.getHeight() == 0 ? null : house.getHeight());
// seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
// seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
// seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
// if (house.getAvgPrice() != null && house.getAvgPrice() != 0) {
// seawater.setUnitPrice(house.getAvgPrice());
// } else {
// if (house.getTotalPrice() != null && house.getTotalPrice() > 0 && house.getArea() != null && house.getArea() > 0) {
// int price = (int) (house.getTotalPrice() / house.getArea());
// seawater.setUnitPrice(price == 0 ? null : price);
// }
// }
// seawater.setDecoration(house.getFitment());
// if (house.getPublishDate() != null) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// seawater.setPublishDate(sdf.format(house.getPublishDate()));
// }
// houseList.add(seawater);
// }
// }
// }
BasicModel basicModel = new BasicModel(200, "ok");