|
|
@@ -373,9 +373,14 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
hotel.setRoom_number_calc(mhd.get().getTotalHouseNum().toString());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- Optional<HotelPriceOneDataVo> one = newOneDatas.stream().filter(e -> e.getManagerId().equals(hotel.getManagerId())).findFirst();
|
|
|
- Optional<PriceHotelDataVo> min = mins.stream().filter(e -> e.getManagerId().equals(hotel.getManagerId())).findFirst();
|
|
|
+ Optional<HotelPriceOneDataVo> one = null;
|
|
|
+ if (!newOneDatas.isEmpty()){
|
|
|
+ one = newOneDatas.stream().filter(e -> e.getManagerId().equals(hotel.getManagerId())).findFirst();
|
|
|
+ }
|
|
|
+ Optional<PriceHotelDataVo> min = null;
|
|
|
+ if (mins!=null){
|
|
|
+ min = mins.stream().filter(e -> e.getManagerId().equals(hotel.getManagerId())).findFirst();
|
|
|
+ }
|
|
|
if (one != null && one.isPresent() && min != null && min.isPresent()) {
|
|
|
if(one.get().getPrice() > min.get().getPrice()){
|
|
|
hotel.setMin_price(decimalFormat.format(min.get().getPrice()));
|